[postgis-users] Count the number of times a geometry crosses another

Matt McClelland matt at wildwalks.com
Sun Dec 4 17:12:09 PST 2011


Hi All

I am building a map useing two separate creek data sets (OSM creeks and DEM
derived creeks).  The OSM data is much better especially where the rivers
are in flat country.

I am wanting to find all the creeks in the DEM dataset that are already in
the OSM (so they can be deleted).
I am happy to delete a DEM creek if it is crosses an OSM creek twice to
more times (if it crosses just once then it is more likely a side creek)

Is there a function like "ST_Crosses" that returns a count of the number of
times a geometry is crossed?  Or any other better ideas on how to determine
duplicate creeks?
I have attached an image to show the issue.  Light blue are OSM creeks and
dark blue are DEM derived creeks

Thanks

Matt  :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20111205/34fbd08e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: two creek sets.png
Type: image/png
Size: 251562 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20111205/34fbd08e/attachment.png>


More information about the postgis-users mailing list