NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I have about 1000 nodes/locations of interest from openstreetmap. I queried overpassturbo API to get coordinates of those 1000 locations/nodes. What I am interested in is, getting a polygon based KML/shapefile for each of those 1000 locations. So basically, let's say I go to 1 of those 1000 locations on the map, currently I just have one location pointer for that location. But I need a whole polygon drawn for the location. For example, if it's a supermarket, I need a KML file for it such that it can show me a polygon drawn over the entire supermarket and not just a location pointer.

Is it possible to get that from overpassturbo API or anywhere else? Thanks in advance.

asked 14 Sep '20, 15:51

Aashay's gravatar image

accept rate: 0%

edited 14 Sep '20, 20:34

post your current turbo routine.

(14 Sep '20, 19:47) DaveF


I am just simply querying for a few nodes of my interest from overpassturbo-api. And I get all the location pointers for my places of interest. But what I need is, a polygon of the entire place drawn for each of those location pointers. Here's a sample query im using:

[out:json][timeout:25]; ( node["building"="<xyz>"]; ); out body;

(14 Sep '20, 20:32) Aashay

If you want ways, why are you querying nodes?

(14 Sep '20, 21:46) InsertUser

Actually, I need nodes only. Basically all I need is, let's say I have a location pointer pointing to a supermarket - I need a kml or a shape file where in there is a polygon drawn over the edges of the supermarket. Or else even an array of coordinates that run along the boundaries of the supermarket is fine. I am not sure if that is even possible with overpassturbo-api. Is there any way in which I can get this? or any alternative way to get this?

(14 Sep '20, 21:53) Aashay

Objects in OSM can be mapped as dots, as areas or as multipolygons. It's a matter of mapping preference, object complexity, available time and other factors how a mapper does it.

With your query you are only retrieving those buildings that have only been mapped as a single node without outline. To get all buildings you need to also query for ways and relations. As a start you can change node["building"="xyz"] to nwr["building"="xyz"].

Modify your query and if you need more help please post the new query with specific questions.

permanent link

answered 15 Sep '20, 10:12

TZorn's gravatar image

accept rate: 15%

out geom;

Save as KML under Export option in Turbo

[bbox:{{bbox}}]; is required to limit returned data to the size of your window otherwise you'll download worldwide.

permanent link

answered 15 Sep '20, 23:53

DaveF's gravatar image

accept rate: 16%

edited 16 Sep '20, 01:17

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 14 Sep '20, 15:51

question was seen: 3,414 times

last updated: 16 Sep '20, 01:17

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum