[gdal-dev] create attribute table

Frank Warmerdam warmerdam at pobox.com
Fri Jan 21 10:01:53 EST 2011


On 11-01-21 09:49 AM, Mohammed Rashad wrote:
> how to create attribute table for vector using ogr?
>

Mohammed,

New attribute fields are created on a vector layer in OGR using the
CreateField() method on the layer.  This is covered in the read/write
tutorial (search for CreateField about 2/3 of the way down):

   http://www.gdal.org/ogr/ogr_apitut.html

See also:

   http://www.gdal.org/ogr/classOGRLayer.html#00b1376a1eabb1298ef278f92f6d84be

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the gdal-dev mailing list