This project has moved and is read-only. For the latest updates, please go here.

The *Key* of the features of a shape file

Feb 11, 2010 at 12:51 PM

Let's say I read a shape file, and I have list of features  [FeatureDataRows].   Now let's say I would like to, in my own SQL Server table, store other corresponding information for each feature.  Is there a reliable Key I can use to store that corresponding information and always be able to relate back to a particular feature from my shape file?    Thank you.

Feb 11, 2010 at 1:28 PM

Hi Frank, Generally the key within a shapefile is the index which is a uint starting at 1. AFAIK records should never be removed from a shapefile rather they are set with a null geometry. This means that the index for a given record will never change even if records are appended or "deleted". If the data is exported into a new shapefile the indexes may well change. hth jd

Feb 11, 2010 at 2:53 PM

Thanks, John.  That's exactly what I did.    Good.

John - I owe you an e-beer, and a real beer if you're ever in my region.