[gdal-dev] Create a shape file with polygons

Paolo Corti pcorti at gmail.com
Mon Jan 17 12:18:17 EST 2011


> I`m new developing software with GDAL and OGR libraries. I has used the code
> from the OGR web that read and write a shapefile (points). What I really
> want is to read and write shapefiles with polygons.

Hi Jorge
if you are using Python this [0] is the best resource out there.
Look at the sample in week 2 of the tutorial for effectively writing
(and reading) a Polygon shapefile.
If you are not using Python you should not have too much problems for
converting the Python code to the language you are using.
Another very good resource is to look at the source code: again,
supposing that you are using Python, this sample [1] should work for
you

ciao
P

[0] http://www.gis.usu.edu/~chrisg/python/2009/
[1] http://trac.osgeo.org/gdal/browser/trunk/gdal/swig/python/samples/assemblepoly.py

-- 
Paolo Corti
GIS specialist and web developer
web: http://www.paolocorti.net
twitter: @paolo_corti


More information about the gdal-dev mailing list