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

Hello, Is there a way to get information about the current zone from OpenStreetMap shapefile ? I mean, I need info whether I am inside the city or outside the city. Is there an attribute that I could use for that ?

asked 07 Feb '13, 11:11

LukaszP's gravatar image

LukaszP
1112
accept rate: 0%

LukaszP, could you tell more about this question ? What do you mean by the city limits, administration borders or other limits ? And secondly what the apparatus youre using ? Greetz

(07 Feb '13, 11:33) Hendrikklaas

From the gheofabrik shapefiles (assuming you use geofabrik shapes) there is no easy way, as they don't contain admin boundaries.

If you had a shapefile with each city as a polygon you could use standard GIS Software (e.g. QGis, ArcGIS) or command line OGR tools (don't know which, though) to determine if your point is inside the "city" polygon.

What's your application/use for the information? Maybe there is a better way.

permanent link

answered 07 Feb '13, 12:35

gormo's gravatar image

gormo
2.9k32660
accept rate: 13%

city limits : e.g. rural or urban, it's something like administration borders

I've found Tag:boundary=administrative, does it mean that when the value of admin_level = 8 then i'm inside the city, and <> 8 means outside ?

I am using http://downloads.cloudmade.com/ to get shapefiles. One shapefile per country, not per city.

(07 Feb '13, 12:40) LukaszP
1

Hi Lukasz, just a hint: data downloads from cloudmade.com seem to be very outdated, from December 2011!

Have a look at http://geofabrik.de ... they offer up-to-date data files.

(07 Feb '13, 22:43) stephan75

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×87

question asked: 07 Feb '13, 11:11

question was seen: 2,929 times

last updated: 07 Feb '13, 22:44

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