[geos-devel] Clipping geometries

Paul Meems bontepaarden at gmail.com
Mon Dec 16 23:22:13 PST 2013

Thanks Sandro for your answer.
Is some documentation available which tells me which combinations
(line-polygon, polygon-polygon, line-line, etc.) should work and which not?



 *Paul Meems *
Release manager, configuration manager
and forum moderator of MapWindow GIS.

Owner of MapWindow.nl - Support for
Dutch speaking users.

2013/12/16 Sandro Santilli <strk at keybit.net>

> On Mon, Dec 16, 2013 at 10:54:47AM +0100, Paul Meems wrote:
> > Hi List,
> >
> > We use GEOS with GDAL in our MapWinGIS project (mapwingis.codeplex.com)
> and
> > we have some questions about clipping and how it is implemented in GEOS.
> >
> > I have a polyline shapefile with the USA major roads, most roads overlap
> > multiple states.
> > I also have a polygon shapefile with USA states.
> >
> > When I clip the roads with the states I would expect a polyline as a
> result
> > where a road that crosses a state border is clipped resulting in two
> > polylines.
> > Is this the expected behavior and which GEOS methods should I use to
> > accomplish this?
> ST_Intersection(road, state), for each state, would give the
> state-belonging
> segment at each call.
> > Now switching the layers. I clip the states with the roads and when a
> road
> > crosses the state and starts and ends outside the state the state is
> > divided into two polygons with the road as the new border.
> > This might be less common, so I wonder if I can expect from GEOS to
> handle
> > this. And again which GEOS methods should I use if this is possible?
> There's no single method in GEOS doing that.
> PostGIS exposes an ST_Split method to do it, which basically
> polygonizes the noded linework of inputs.
> --strk;
> _______________________________________________
> geos-devel mailing list
> geos-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geos-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geos-devel/attachments/20131217/7388512f/attachment.html>

More information about the geos-devel mailing list