[gdal-dev] nonspatial column with ogr.

Frank Warmerdam warmerdam at pobox.com
Tue Aug 24 11:08:31 EDT 2010


ahmet temiz wrote:
> hello
> 
> I can create spatial column. But I don't know how I can create
> nonspatial column with ogr in gdal-java.
> 
> something like column "name" and its value "xxxx"
> 

Ahmet,

I believe you are looking for the CreateField() method on the OGR Layer
class.  Note that it does not provide a mechanism to populate the new
column with a particular value for pre-existing features.

 
http://www.gdal.org/java/org/gdal/ogr/Layer.html#CreateField%28org.gdal.ogr.FieldDefn,%20int%29


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