[gdal-dev] ERROR: Points of LinearRing do not form a closed linestring

Luca Delucchi lucadeluge at gmail.com
Tue Sep 2 06:47:54 PDT 2014


Hi everybody,

I created a script to filter some lidar data, and It worked perfectly
some weeks ago.
Now I have to run with different data but I obtain the following error
when I try to overlaps two geometry.

ERROR 1: IllegalArgumentException: Points of LinearRing do not form a
closed linestring

The code that I'm using is something similar to this

import osgeo.ogr as ogr
import osgeo.osr as osr
# this is the input vector file to read the features for filter the lidar point
inDatasource = ogr.Open('/incoming/james_lidar.json')
inLayer = inDatasource.GetLayer()
inFeature = inLayer.GetFeature(0)
geom = inFeature.geometry()
geom.ExportToWkt()
'POLYGON ((661300 5115700,661300 5117600,662300 5117600,662300 5115700))'
# this is the polygon of a lidar tile bounding box
wkt = 'POLYGON((660000 5116000,660000 5118000,661793 5118000,661793
5116000,660000 5116000))'
poly = ogr.CreateGeometryFromWkt(wkt)
geoms.Overlaps(poly)
ERROR 1: IllegalArgumentException: Points of LinearRing do not form a
closed linestring

What I'm doing wrong?

-- 
ciao
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org


More information about the gdal-dev mailing list