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

clipping polygons and relations that exceed the borders of the exported map

0

Hi,

I want to use the open world map data in an app that I develop. The app generates chunks around the player. Each chunk draws the information provided in a .osm file that has the same name as the chunk. The problem is that the polygons and relations sometimes go over the map border and are drawn multiple times because of that. This costs performance. Is there any program or online-service that clips the polygons and relations that go over the border of the exported map? If not, I'll need to write a script that does this. I tried to split a big .osm file into several small ones with osmosis but didn't got the intended result with it.

asked 28 May '17, 14:16

Time2Design's gravatar image

Time2Design
15223
accept rate: 0%

edited 28 May '17, 14:17


One Answer:

0

I developed a text based application to solve my issue. It can cut any polygon and line from osm street map so the polygon or line is only existent and visible inside the bounds and not outside of them. The application adds points to the edges and corners of the exported map if nessessary.

answered 07 Jun '17, 18:03

Time2Design's gravatar image

Time2Design
15223
accept rate: 0%

Source code available on GitHub .