[gdal-dev] FileGDB -preserve_fid

Jeremy Palmer JPalmer at linz.govt.nz
Thu Dec 13 00:56:14 PST 2012


>
> At first sight, I would say it is a limitation of the FileGDB API.
>
> In FGdbLayer::CreateFeature( OGRFeature *poFeature ),
>
> you can see the following commented code :
>
>   /* Cannot write to FID field - it is managed by GDB*/
>    //std::wstring wfield_name = StringToWString(m_strOIDFieldName);
>    //hr = fgdb_row.SetInteger(wfield_name, poFeature->GetFID());
>
> So there was an attempt made of preserving the FID, but apparently it doesn't
> work.
>
> Looking at Row.h in the FileGDB API include files, I can see that there's a
> public GetOID() method, but SetOID() is private. So it seems that the FileGDB
> API manages itself the OID.
>
> Even

Thanks for the info. So what are the options to get the source FID data into FileGDB? I found if I remove the primary key from the Postgresql table that works. However this is a less than desirable option.

Cheers
Jeremy

This message contains information, which is confidential and may be subject to legal privilege. If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify us immediately (Phone 0800 665 463 or info at linz.govt.nz) and destroy the original message. LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ. Thank You.


More information about the gdal-dev mailing list