[FWTools] return a features geometry

Travis Kirstine traviskirstine at gmail.com
Thu Sep 11 10:58:21 EDT 2008


Is there a method to return all (polygon) feature geometries as a
list using python?

layer = shp.GetLayerByName(layerName)
feature  = layer.GetNextFeature()
polyGeom = feature.GetGeometryRef()
exteriorRing = polyGeom.GetGeometryRef(0)
print exteriorRing.GetX(0), exteriorRing.GetY(0) # return only one coord pair



-- 
Travis K.

Toronto, Canada
------------------------------------------------------------
"She knows there's no success like failure
And that failure's no success at all."
-Bob Dylan-
------------------------------------------------------------


More information about the FWTools mailing list