Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
4173 Zobrazení

Hi,I want to insert and retrieve some geographical data in my database.I am using PostGIS to do that.currently, I am using self._cr.execute() to run my commands. but I want to know if there is a way to do this without executing the raw query.Query I am using write now'''select ST_AsGeoJSON(geom),
farmid from geojson where ST_Distance_Sphere(
ST_Point(ST_X(ST_Centroid(geom)), ST_Y(ST_Centroid(geom))),
(ST_MakePoint({lati}, {longi}))) <= {radius}'''.format(
lati=lati, longi=longi, radius=radius)

Avatar
Zrušit
Nejlepší odpověď

You can import the geojson data and create the shapes with coordinates, coordinates should follow same standard, otherwise the coordinates location you expect might land nowhere in sea!

You can also use oca/geospatial, QGIS and xmlrpc.

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
úno 25
1630
2
led 25
8272
2
led 24
10138
7
led 24
49067
0
bře 23
2146