<div dir="ltr">Hi Martin,<div><br></div><div>Thanks for the answer and sorry for the late reply.</div><div>Because we couldn't do a quick magic trick we had to move on.</div><div><br></div><div>But now I'm at a similar point. </div><div>Again I have two large polygons files that I want to clip. </div><div>This is very slow. In fact, I have never succeeded because after 6+ hours I canceled the process.</div><div><br></div><div>You mentioned a new function could be added to GEOS for quicker clipping of polygons.</div><div>Is that still the case? If so how much budget would be needed to get this function built?</div><div>It is quite a showstopper for us right now and I could gather some funding for this.<br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><div dir="ltr">Regards,<br>
<br>Paul Meems</div></div></div></div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Op di 15 okt. 2019 om 20:01 schreef Martin Davis <<a href="mailto:mtnclimb@gmail.com">mtnclimb@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">This sounds like a classic polygon coverage overlay operation?  <div><br></div><div>The "obvious" way to do this in GEOS is by using the overlay operations.  However, these work on pairs of geometries only, which means that (a) it's a bit complicated to compute a full polygon coverage overlay and (b) this tends to be quite slow. </div><div><br></div><div>The other way to do this in GEOS is to node the linework of the input coverages (GEOSUnion can do this), polygonize the linework, generate interior points for all resulting polygons, and then determine the parentage of each resultant by using point-in-polygon tests against the input coverages.</div><div><br></div><div>This is a fair amount of complex code. But it should be faster (at least, if spatial indexes are used where appropriate).</div><div><br></div><div>Perhaps we can add a function into GEOS to perform this operation at some point.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 15, 2019 at 1:06 AM Paul Meems <<a href="mailto:bontepaarden@gmail.com" target="_blank">bontepaarden@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">
Hi List,<br><br>I have a large shapefile (land use) with a lot of small shapes (392k).<br>I also have a smaller shapefile (catchments) with larger shapes (2.5k).<br>The smaller shapefile overlaps the larger shapefile in the center.<br><br>I need to create a new shapefile (expected number of shapes is several 100k) that have the values of the land use and the catchments combined. <br>Currently, I'm doing a GEOSClip() of the land use by the catchment first and then a GEOSUnion of the clipped result and the catchment.<br><br>This is a bit slow. The clipping already takes 40 minutes.<br><br>Am I using the right approach or should I use a different one?<br><br>Extra info. I'm using MapWinGIS (C++) which includes GDAL and GEOS.<br>This is the implementation of GEOSClip:<br><a href="https://github.com/MapWindow/MapWinGIS/blob/develop/src/COM%20classes/Shapefile_Geoprocessing.cpp#L1936" target="_blank">https://github.com/MapWindow/MapWinGIS/blob/develop/src/COM%20classes/Shapefile_Geoprocessing.cpp#L1936</a><br>It was created years ago. Perhaps the implementation can/should be optimized as well.<br><br>Thanks,<br></div><div dir="ltr"><br></div><div>Paul Meems</div><div><br></div></div></div></div></div></div></div>
_______________________________________________<br>
geos-devel mailing list<br>
<a href="mailto:geos-devel@lists.osgeo.org" target="_blank">geos-devel@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/geos-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/geos-devel</a></blockquote></div>
_______________________________________________<br>
geos-devel mailing list<br>
<a href="mailto:geos-devel@lists.osgeo.org" target="_blank">geos-devel@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/geos-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/geos-devel</a></blockquote></div>