Returns null geometries
See original GitHub issueHello,
From not I was only using Overpass API Python wrapper for querying nodes. I would like to use it now for querying ways and I got back only null geometries.
Here my code:
query_text = 'area(3602134786)->.a;(nwr[leisure~"^(park)$"](area.a););'
api = overpass.API()
result = api.get(query_text)
And an extract of what I got returned:
{"features": [
{"geometry": null,
"id": 51876557,
"properties": {"barrier": "fence", "leisure": "park", "name": "Parc Wilson"},
"type": "Feature"
},
{"geometry": null,
"id": 51925873,
"properties": {"barrier": "fence", "leisure": "park", "name": "Parc Napol\u00e9on", "ref:FR:FANTOIR": "576721870A"},
"type": "Feature"
},
{"geometry": null,
"id": 65283729,
"properties": {"leisure": "park", "name": "Square Robert Schuman", "source": "cadastre-dgi-fr source : Direction G\u00e9n\u00e9rale des Imp\u00f4ts - Cadastre. Mise \u00e0 jour : 2010"},
"type": "Feature"
},
...
], "type": "FeatureCollection"}
When I do the exact same request using Python librairy requests
, I actually got non null geometries:
import requests
import json
overpass_url = "http://overpass-api.de/api/interpreter"
query_text = 'area(3602134786)->.a;(nwr[leisure~"^(park)$"](area.a););'
response = requests.get(overpass_url,
params={'data': query_text})
data = response.json()
Any idea of what is going wrong?
Thanks for your help,
Pauline
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
Missing and empty geometries - GeoPandas
Empty geometries are actual geometry objects but that have no coordinates (and thus also no area, for example). They can for example originate...
Read more >What does it mean by NULL geometry of a shapefile in ArcGIS?
A shape type of 0 indicates a null shape, with no geometric data for the shape. Eachfeature type (point, line, polygon, etc.) supports...
Read more >How To: Create geometry for a feature with null ... - Esri Support
This article describes how to create geometry for a feature with null geometry using the Replace Geometry tool in ArcGIS Pro. Procedure. Add...
Read more >Null Geometry ShapeFiles · Issue #326 · Riverscapes/gcd
Null geometries occur when a ShapeFile (can be point, line or polygon) has a record in the attribute table but not corresponding geometry....
Read more >Null (geometry Data Type) - SQL Server | Microsoft Learn
Syntax. Copy. Null. Note · Return Types. SQL Server type: geometry. CLR type: SqlGeometry. Remarks · Examples. The following example retrieves a ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I actually found the trick after having spent days in the docs and the code: You need to add the parameter
verbosity="geom"
when passing your request as in the following example.Hope it helps!
The conversion to geojson of relations and areas are not supported.