masking out part of a MULTILINESTRING

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

masking out part of a MULTILINESTRING

Purvis, Charlton
masking out part of a MULTILINESTRING

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

Reply | Threaded
Open this post in threaded view
|

Re: masking out part of a MULTILINESTRING

strk-2
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
> [hidden email]
> http://postgis.refractions.net/mailman/listinfo/postgis-users