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

I have an application that processes exported OSM files, and I would like to know how exporting handles areas (that is closed <way></way> elements with the appropriate tags) that are partially outside of the export bounds.

So if we consider this example, where green circles represent the area nodes (the green lines are there just to make clear how the nodes make up the area) and the red rectangle represents the export region: Example

I imagine exporting could only behave in one of the following ways:

  • It includes the entire area nodes in the exported OSM file: All nodes
  • It does not include the area at all in the exported OSM file: No nodes
  • It includes only those nodes of the area that are inside the export bounds: Nodes inside only
  • It includes those nodes of the area that are inside the export bounds, as well as one additional node for every way segment that "enters" or "leaves" the export rectangle: Nodes inside and around only

The last two scenarios seem unlikely to me, cause in these scenarios, the output area would not always correctly represent the portion of the original area that is within the export bounds (it does not in the examples above). And the second scenario would be problematic to me, cause it means that you cannot export a specific region and be guaranteed that you will have ALL the elements that are either fully or partially within that region in the output OSM file. For that you would have to export a larger region that covers all the areas, but generally you don't know, for each area that is partially outside of the region of interest, how far out does it go...

So how exactly does exporting handle an area that is partially outside of the export bounds? I use the built-in export feature of the interactive openstreetmap.org map (manually select an area then click on "Export" button) as well as the overpass API, so I'm interested to know what the behavior is for each of those solutions.

asked 18 Jul '21, 13:03

Namefie's gravatar image

Namefie
11112
accept rate: 0%

edited 18 Jul '21, 14:50

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:

×315
×213

question asked: 18 Jul '21, 13:03

question was seen: 650 times

last updated: 18 Jul '21, 14:50

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