[postgis-users] Clipping a polygon using a linestring?

Paul Ramsey pramsey at refractions.net
Wed Jun 20 13:21:43 PDT 2007


We still don't have a polygon splitting routine in GEOS/JTS, so there's 
no direct perfect way of doing this.

One ugly way to split the polygon is to buffer the line every so 
slightly and then difference it out. That still leaves you with the 
problem of allocating the resulting polygons to the left and right sides 
of the line.

Funders for split-polygon are welcome to step forward. Otherwise, 
waiting will eventually cause it to pop out, it is on the roadmap, just 
behind paid work, per usual.

P

Paul Moen wrote:
> Is there a way to take a polygon or multipolygon and clip with a linestring?
> 
> I am trying to take the polygon outlined in black, clip it using the 
> blue LINESTRING to achieve the grey multipolygon.
> 
> Is this possible?  I think the difference function would work if the 
> LINESTRING were a polygon. Keep in mind that this drawing is rough.
> 
> 
> 
> 
> Thanks,
>  
> Paul Moen
> pmoen at nd.gov
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users


-- 

   Paul Ramsey
   Refractions Research
   http://www.refractions.net
   pramsey at refractions.net
   Phone: 250-383-3022
   Cell: 250-885-0632



More information about the postgis-users mailing list