[gdal-dev] fid column info missing

Even Rouault even.rouault at mines-paris.org
Sat Oct 17 05:24:33 EDT 2009


Selon Martin Landa <landa.martin at gmail.com>:

> Hi,
>
> I wonder how to get information about connection between geometry and
> attributes when OGRLayer::GetFIDColumn() returns "". For the
> shapefiles I have tested GetFIDColumn() returned always "". How to
> link attributes if this information is missing?

Martin,

I'm not sure to understand what you mean with "connection between geometry and
 attributes". The OGRFeature concept is precisely containing both, so you don't
need to do anything special.

For shapefiles, it is expected that GetFIDColumn() returns "", as the FID for a
shape feature is just a sequence number incremented each time the driver reads a
new "row" in the .shp and the .dbf files. OGR uses no column in the .dbf to get
the FID.

You'll probably also find here answers to your questions about the
GetFIDColumn() method : http://trac.osgeo.org/gdal/ticket/2694

Best regards,

Even



More information about the gdal-dev mailing list