0

I am looking for a tool or query to split the OSM highways into multiple segments. Each segment should only consist of two nodes (start and end).

I should do the same as described in this GIS Stackexchange answer but with PostGIS.

Is there an importing tool like osm2po that I can do this with? Note I don't only want to split it at intersections.

Or alternatively, how could I use ST_Split() or ST_Dump() to do this?

2

You are going to split at each point? This may produce tons of data!

Yes, osm2po can do that. Usually osm2po splits at intersections or at important nodes such as levelcrossings if necessary. The trick is, to give these nodes an importance. Namely, by setting the Node-Clazz >0. A good example of how to do it you'll find inside the plugins-source-zip. Look for TrafficSignals. In your case every node seems important, so just remove the condition.

  • Yes I want to split it at each point. I will only do this for a small extract, so I am not to concerned about the data volume. Can you point out a little further where exactly I have to set the Node-Clazz or where exactly inside the plugins-source-zip I can find an example? – ustroetz Dec 3 '14 at 17:07
  • Are you familiar with Java? If not, try to convert the created road segments with PostGIS means. – Carsten Dec 5 '14 at 21:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.