tyrasd / overpass-turbo

A web based data mining tool for OpenStreetMap using the Overpass API.
https://overpass-turbo.eu
Other
937 stars 132 forks source link

Not getting polygon geometry type in data downloaded after converting to shape file #440

Open Rajskc opened 5 years ago

Rajskc commented 5 years ago

Hi, I am new to this tool, I have written a query which is showing polygons in the map, but when I am downloading the data and converting it to shape file, only point type geometry is being shown. Am I missing something? How to get the polygon geometry type in shape file through overpass turbo query? There seems to be less documentation regarding polygons, can anyone share some good resource for the same.

Query in https://overpass-turbo.eu/:

[out:json]; area[name="hyderabad"]; ( node"amenity"="restaurant"; way"amenity"="restaurant"; relation"amenity"="restaurant"; ); (._;>;); out center;

simolg commented 10 months ago

you can use the "geom" parameter for out statement, like this:

(
node["amenity"="restaurant"];
way["amenity"="restaurant"];
relation["amenity"="restaurant"];
); out geom;

with this request you will find some nodes, ways and relations; for "way" you will have the coordinates of each point of the polygon.

you can also use nwr["amenity"="restaurant"]; (short form)