NOTICE: is being shutdown on 1st March 2024. Please use the OpenStreetMap Community Forum

Hi to all,

I want to get geojson value for a region(city/state/country). I tried as,India&polygon_geojson=1&format=json&limit=1 But it did not give geojson(return geojson for few regions only). If I remove limit,,India&polygon_geojson=1&format=json It will return multiple values, geojson also available for type = administrative. So Now i want to a single API for get geojson for a region with type=adminstrative. Any suggestions?

Thanks Rajavelu

asked 30 Jun '15, 08:22

Rajavelu_M's gravatar image

accept rate: 33%

edited 30 Jun '15, 08:25

For smallish areas use Overpass-Turbo. The client side code in Overpass-Turbo enables the queried OSM data to saved directly as geojson. Once the data gets too big you run into problems both with server-side timeouts (and potentially blocks), and/or client-side memory issues.

This is an example of a simple Overpass-Turbo query for admin units around Chennai. It can be refined by asking only for certain levels of admin units, and by using the area feature to restrict the request to a specific polygon.

permanent link

answered 30 Jun '15, 10:30

SK53's gravatar image

SK53 ♦
accept rate: 22%

Your answer
toggle preview

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: 30 Jun '15, 08:22

question was seen: 4,573 times

last updated: 30 Jun '15, 10:30

NOTICE: is being shutdown on 1st March 2024. Please use the OpenStreetMap Community Forum