[gdal-dev] Clipping shapefile with another produces invalid shapes

Even Rouault even.rouault at spatialys.com
Thu Oct 12 14:28:28 PDT 2017


Paul,

> But at the red asterix, I have an invalid shape. The reason is according to
> GEOS:
> Polygon must be clockwise

I can't see such error emitted by GEOS source code.

even at even-i700:~$ grep -r "must be clockwise" geos/
even at even-i700:~$ 


Are you sure this comes from it ? As far as I know, GDAL and GEOS are pretty much 
indifferent regarding the winding order of polygons. Other tools might be more sensitive.

You could possibly use the ST_ForceLHR() function of spatialite (through the SQL SQLite 
dialect) to post process your result:
http://www.gaia-gis.it/gaia-sins/spatialite-sql-4.2.0.html

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20171012/7802f7b8/attachment.html>


More information about the gdal-dev mailing list