Timeline for Why does this simple Python OGR code create an empty polygon?
Current License: CC BY-SA 3.0
3 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 7, 2012 at 0:37 | comment | added | Dave | Yes, but i still have the problem with even simpler code: #myPoly.GetArea() returns area of zero... from osgeo import ogr #create polygon object: myRing = ogr.Geometry(type=ogr.wkbLinearRing) myRing .AddPoint(0.0, 0.0)#LowerLeft myRing .AddPoint(0.0, 10.0)#UpperLeft myRing .AddPoint(10.0, 10.0)#UpperRight myRing .AddPoint(10.0, 0.0)#Lower Right myRing .AddPoint(0.0, 0.0)#close ring myPoly = ogr.Geometry(type=ogr.wkbPolygon) myPoly.AddGeometry print (myPoly.GetArea() ) | |
Dec 7, 2012 at 0:30 | review | Low quality posts | |||
Dec 7, 2012 at 1:33 | |||||
Dec 7, 2012 at 0:11 | history | answered | saint_utz | CC BY-SA 3.0 |