Paul Meems
8 years ago
Hi list,
I have a very large shapefile, with almost 700k shapes which I want to clip
with a border shapefile (in red):
https://ibb.co/gKth1G
I'm using this command:
ogr2ogr -clipsrc "border.shp" -overwrite -explodecollections -f "ESRI
Shapefile" ogr_clipped.shp Fishnet.shp
with GDAL 2.1.3, released 2017/20/01
Eventually, I'll transform the command to a call to ogr.VectorTranslate().
The result is visually correct:
https://ibb.co/hOvJab
But at the red asterix, I have an invalid shape. The reason is according to
GEOS:
Polygon must be clockwise
I have more of these errors.
They all seem to occur when the shape due to the clipping is triangular
shaped:
https://ibb.co/cKuY8w
https://ibb.co/eXcWvb
Is this an error/warning which can be expected or do I need to add an
additional parameter?
If needed I can try to make a test set with as little data as possible.
Thanks,
Paul
I have a very large shapefile, with almost 700k shapes which I want to clip
with a border shapefile (in red):
https://ibb.co/gKth1G
I'm using this command:
ogr2ogr -clipsrc "border.shp" -overwrite -explodecollections -f "ESRI
Shapefile" ogr_clipped.shp Fishnet.shp
with GDAL 2.1.3, released 2017/20/01
Eventually, I'll transform the command to a call to ogr.VectorTranslate().
The result is visually correct:
https://ibb.co/hOvJab
But at the red asterix, I have an invalid shape. The reason is according to
GEOS:
Polygon must be clockwise
I have more of these errors.
They all seem to occur when the shape due to the clipping is triangular
shaped:
https://ibb.co/cKuY8w
https://ibb.co/eXcWvb
Is this an error/warning which can be expected or do I need to add an
additional parameter?
If needed I can try to make a test set with as little data as possible.
Thanks,
Paul