Re: [gdal-dev] Creating a simple shapefile with ogr

2010-05-27 Thread Even Rouault
You didn't bind the geometry to the feature Add feature.SetGeometry(polygon) before layer.CreateFeature(feature) Le Thursday 27 May 2010 23:35:49 Discourse Maps, vous avez écrit : > Hi, > > > > I am trying to create a basic polygon shapefile using OGR in Python. > > Any help with fixing my code i

[gdal-dev] Creating a simple shapefile with ogr

2010-05-27 Thread Discourse Maps
Hi, I am trying to create a basic polygon shapefile using OGR in Python. Any help with fixing my code is appreciated. Currently, it creates a shapefile, but nothing shows up in ArcGIS. # GDAL from osgeo import ogr, gdal from osgeo.gdalconst import * # sample data data = [[317.0,