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

How to avoid exceeding roads through country borders ?

0

Hi,

I've made an extract of whole country using osmosis and *.poly file with border nodes coordinates.

Is it possible to avoid exceeding roads which starts in extract country through country borders ? I want those roads finished exactly at country border.

Thanks for any advices..

asked 30 Aug '11, 11:00

MrX1's gravatar image

MrX1
467711
accept rate: 0%


One Answer:

0

No, this is not possible with Osmosis. It would require the creation of a pseudo node that sits on the intersection of the country border with the road, and Osmosis doesn't do that. I don't know of any program that does it, actually. You can load OSM data into PostgreSQL and then intersect each road with the country border; this will cut the roads in the way you want, but your geometries will then not be strictly based on OSM nodes any more.

If you use --clipIncompleteEntities=true then ways will stop at the last node before the border.

answered 30 Aug '11, 11:13

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

edited 30 Aug '11, 12:19

Source code available on GitHub .