[Gdal-dev] creating shape files
bmarchand at ara.com
Mon Jul 28 14:59:45 EDT 2003
I am new at using the OGR classes in GDAL and I'm attempting to read a
shape file, change the projection, and then write the modified data to a
new file. When the new shape files get created the dbf file has no
fields in it. When I trace through the code I see that the dbf file gets
populated from a OGRFeatureDefn object in the OGRShapeLayer class. This
seems to get initialized when the layer is created but it never gets
set. Even after creating multiple features in the layer. Then when
reading the shape file it fails because the nRecords member in the
DBFHandle class is zero.
How do I apply a feature definition to a newly created layer?
Since the layer has an association to just one OGRFeatureDefn object,
can I assume that all the features in a layer are required to have the
same feature definition?
Thanks in advance,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gdal-dev