[OSM-dev] PostGIS query "Crossing ways"

Mike N niceman at att.net
Sun Sep 11 15:20:10 UTC 2016


Given a PostGIS database populated from OSM data by osm2pgsql, and 2 
sets of lines  (such as the selection of all footways and the selection 
of all roads)   what function or series of functions will result in a 
list of locations where footways cross roads without any OSM connecting 
node?  (the equivalent of JOSM's "Crossing Ways" warning)

   According to the PostGIS documentation, ST_Intersect() includes 
"Touches", which I assume would be sharing an OSM node.

   ST_Crosses() might be what I want, but does it exclude the crossings 
that share a node?   If not, do I just remove all the ST_Intersect() 
results that are spatially close to ST_Crosses()?

   Thanks,



More information about the dev mailing list