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

Stephen Woodbridge woodbri at swoodbridge.com
Sun Dec 4 17:15:56 PST 2011


You might try ST_Intersection(). This should give you back a geometry 
collection of points and lines. Points would represent touching and 
crossing and lines would represent where the two geometries overlap one 
another.

Then you can dump the collections can count the various types of objects 
to get an idea of what is going on.

-Steve

On 12/4/2011 8:12 PM, Matt McClelland wrote:
> 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  :)
>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users




More information about the postgis-users mailing list