drolbr / Overpass-API

A database engine to query the OpenStreetMap data.
http://overpass-api.de
GNU Affero General Public License v3.0
693 stars 90 forks source link

output as GeoJSON is not working #600

Closed ghost closed 3 years ago

ghost commented 3 years ago

Following the documentation, the query url can be extended by "convert item" to get a GeoJSON formatted output.

[out:json]; ( way(51.477,-0.001,51.478,0.001)[name="Blackheath Avenue"]; node(w); relation(51.477,-0.001,51.478,0.001); ); convert item ::=::,::geom=geom(),_osm_type=type(); out geom;

The output doesn't change. The api provide a JSON formatted output.

mmd-osm commented 3 years ago

GeoJSON primarily refers to contents of the geometry fields in the output, not for the document as a whole. You need some post processing on your own to extract those geometry fields as needed.