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)
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Financeiro
- Inventário
- PoS
- Project
- MRP
Esta pergunta foi sinalizada
1
Responder
4143
Visualizações
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.
Está gostando da discussão? Não fique apenas lendo, participe!
Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!
Inscreva-sePublicações relacionadas | Respostas | Visualizações | Atividade | |
---|---|---|---|---|
|
0
fev. 25
|
1593 | ||
|
2
jan. 25
|
8221 | ||
Odoo backend to Google Data Studio
Resolvido
|
|
2
jan. 24
|
10138 | |
|
7
jan. 24
|
49013 | ||
|
0
mar. 23
|
2118 |