This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

problem with manually selecting an area and exporting?

0

When I manually select an area to export, the minimum longitude value (for example) in the osm file is not actually the minimum longitude value across all nodes. So, when I parse the osm file to generate a map in my software program, the bounds cannot be generated correctly (unless I iterate through all nodes and find the minimum longitude value myself).

Am I missing something?

asked 30 Nov '10, 16:48

joelosm's gravatar image

joelosm
5112
accept rate: 0%


One Answer:

2

When you export an osm file you get all the nodes in the bbox, and all ways that contains a node in the bbox, and all the nodes that is contained in those ways, and all the relations that contains a node or a way that is exported.

This means that you can get nodes outside the bbox if it is contained in a way that touches the bbox. Note that you are not guaranteed to get all nodes of any area outside of the bbox. Depending on your application you might have to filter or ignore those nodes.

answered 30 Nov '10, 18:00

Gnonthgol's gravatar image

Gnonthgol ♦
13.8k16103198
accept rate: 16%

Source code available on GitHub .