OpenStreeMap: export a place's boundaries

742 views Asked by At

I'd like to export the boundaries (perimeter) of a place. For instance, consider the boundaries of the University of Illinois at Chicago at this link.

I see it's pretty easy to export an OSM file. But how can I export only that red line (perimeter)?

I don't need a script to do that, even a manual solution would be fine. I tried to navigate the UI for quite a time, but I couldn't find a way.

My ultimate goal is to convert the boundaries to a GeoJson.

1

There are 1 answers

0
cello On

You can use the Overpass API for this.

Go to https://overpass-turbo.eu and enter the following script:

[out:json][timeout:25];
way(210649421);
out geom;

The way-Id was taken from your link. Then click on Run.

Afterwards, you can switch to the Data tab in the top right and copy the JSON for this area.

Alternatively, you can also use Export -> "raw data directly from Overpass API" to directly download a JSON payload, bypassing the browser output. For GeoJSON output, use Export -> "download/copy as GeoJSON" instead.