I was wondering if the labels for neighborhoods (areas) are pinned to a centroid or boundary or if they are free floating? Is it possible to extract these labels somehow? Ideally in the form of a shapefile or other geographically referenced file? It would help greatly with some Haiti mapping projects my group is undertaking.

asked 15 Feb '11, 21:08

karinme's gravatar image

karinme
1111
accept rate: 0%


Places in OSM are simply OSM objects tagged with place=*. Thus they may be nodes located at a specific lat/long by a mapper, or they may be an area created with a closed way, or more complex shapes may be specified with a multipolygon. The answer to your first question is therefore dependant on the primitive used to map a place. Administrative areas are tagged differently and will usually be represented by closed ways or relations.

By 'label' I take it to mean the point at which the name tag is displayed on the slippy map on the OSM home page. The placement of the name is done by separate software (mapnik) and is independent of the how the data is stored in OSM. In practice it uses either the node or the centroid of the shape.

The primitive objects tagged with place are available in OSM XML format files from third-party sources, such as Cloudmade and Geofabrik. Alternatively XAPI can be used to extract OSM data for a given bounding box using [place=*] as a predicate. The osm2pgsql tool is one convenient way of converting this data into other formats. Although this does discard some data, it does preserve all the data which you mention.

Shape files containing the data you require may also be provided by Cloudmade, Geofabrik and others. Certainly Geofabrik have been providing a rich set of resources for Haiti for over a year.

permanent link

answered 16 Feb '11, 00:09

SK53's gravatar image

SK53 ♦
22.9k46233360
accept rate: 20%

We appreciate your answer and the detailed information. With your help we were able to do what we had in mind. Thanks a lot for the support!

permanent link

answered 16 Feb '11, 19:13

karinme's gravatar image

karinme
1111
accept rate: 0%

Your answer
toggle preview

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:

×49
×1

question asked: 15 Feb '11, 21:08

question was seen: 4,478 times

last updated: 16 Feb '11, 19:13

powered by OSQA