<div dir="ltr"><div><div>Thanks Sandro for your answer.<br></div>Is some documentation available which tells me which combinations (line-polygon, polygon-polygon, line-line, etc.) should work and which not?<br><br><br></div>

Thanks,</div><div class="gmail_extra"><br clear="all"><div><br>
<br>
Paul<br>
<br>
<div style="font-size:13.3px;font-family:Verdana,Arial,Helvetica,sans-serif"><div style="border:1px solid #e5e5e5;background-color:#f8f8f8;padding:0.8em 0.8em 0.3em 0.8em"><div style="margin:0 0 8px 0"><p style="margin:0">

<span><b><img style="float:left;margin-left:5px;margin-right:5px" src="http://www.bontepaarden.nl/bontepaarden/images/newButton.png" alt="" height="120" width="160">Paul Meems </b><br><span>Release manager, configuration manager</span><br>

<span>and forum moderator of MapWindow GIS.</span><br><a href="http://www.mapwindow.org/" target="_blank"><span>www.mapwindow.org</span></a><br><br><span>Owner of MapWindow.nl - Support for</span><br><span>Dutch speaking users.</span><br>

<a href="http://www.mapwindow.nl/" target="_blank"><span>www.mapwindow.nl</span></a><br></span></p>
<p style="margin:0"><b><br></b></p></div></div><img src="http://p1.wisestamp.com/pixel.png?p=mozilla&v=3.9.12&t=1322134056890&u=482737fd0c4ca423" height="1" width="1"></div>
</div>
<br><br><div class="gmail_quote">2013/12/16 Sandro Santilli <span dir="ltr"><<a href="mailto:strk@keybit.net" target="_blank">strk@keybit.net</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

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