[postgis-users] masking out part of a MULTILINESTRING

strk at refractions.net strk at refractions.net
Wed Apr 20 09:52:15 PDT 2005


This should be difference(geom, box);
--strk;

On Wed, Apr 20, 2005 at 12:47:38PM -0400, Purvis, Charlton wrote:
> Apologies ahead of time if this is a bone headed Q, but I can't get my hands
> around the function that holds the keys to the kingdom.
> 
> Say that I have one MULTILINESTRING that contains these vertices:
>   (0,0)
>   (1,0)
>   (2,0)
>   (3,0)
>   (4,0)
>   (5,0)
> 
> Now say that I want to mask out the BBOX that is defined by:
>   (1,-1) to (2,1)
> 
> How can I clip the MULTILINESTRING to show me only those lines that are
> outside the BBOX?  If I do a
>   not geom. && BBOX...,
> it kills the whole MULTILINESTRING since part of the MULTILINESTRING is
> inside the BBOX.  And that's not what I want.
> 
> I want to end up w/ an image or geom. that has these segments:
>   (0,0) to (0,1)
>   (2,0) to (5,0)
> 
> Any ideas?
> 
> Thanks,
> 
> Charlton

> _______________________________________________
> 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