Dear all, I try to read fire polygon shapefile by ogr (beginner level), I referred to some sources online: http://geoinformaticstutorial.blogspot.fr/2012/10/accessing-vertices-from-polygon-with.html http://gis.stackexchange.com/questions/8144/get-all-vertices-of-a-polygon-using-ogr-and-python
However, both the links are incomplete as I have polygons who have more than one linearring objects, which fianally turns out to have hole inside the polygon. But I have another strange issue, is that there are some polygons with more than one linearring object, but all the rings have zero points. However, the fire size of the polygon is not zero, and when I checked the same polygon in ArcGIS, there is really a shape! could anyone point out I miss something? thanks!! In [28]: feature = layer.GetFeature(276) geo = feature.GetGeometryRef() geo.GetGeometryCount() Out[28]: 2 In [29]: ring = geo.GetGeometryRef(0) ring.GetPointCount() Out[29]: 0 In [31]: ring = geo.GetGeometryRef(1) ring.GetPointCount() Out[31]: 0 In [34]: feature.items()['SIZE_HA'] Out[34]: 13041.187 Chao -- *********************************************************************************** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 ************************************************************************************
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev