How to get FeatureId using this library

20 views
Skip to first unread message

Peter Dickson

unread,
Jun 28, 2011, 10:53:53 AM6/28/11
to Geospatial Python
The shapefile format gives a unique id to each shape - called the
FeatureId. How do you reference this value using this library?

Joel Lawhead

unread,
Jun 30, 2011, 3:59:16 PM6/30/11
to Geospatial Python
Peter,

The FeatureId is not part of the shapefile spec. It's a standard
database meta number that as far as I know is only used by ESRI. The
FID is assigned dynamically by ArcGIS during a session for
shapefiles. For geodatabase features it is persistent between ArcGIS
sessions.

I have seen scripts for ArcGIS that will copy the FID to a dbf
attribute but this really isn't a good solution. You could also create
your own GUID as a dbf record attribute if you need to track
individual features which I've done before.

The shapefile spec does not allow for any unique identifiers. All
numbering is implied by the order of the records in the file.

If you can describe in detail what you are trying to accomplish there
might be a better solution.

Cheers,
Joel
Reply all
Reply to author
Forward
0 new messages