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 |
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! answered 16 Feb '11, 19:13 karinme |
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. answered 16 Feb '11, 00:09 SK53 ♦ |