[gdal-dev] FileGDBs and FIDs of -21121

Seth G sethg at geographika.co.uk
Tue Aug 27 12:32:14 PDT 2024


Hi all,

I'm using a GDAL within MapServer to export features as a FileGDB. Using the following OUTPUTFORMAT:

    OUTPUTFORMAT
        NAME "FileGDB"
        DRIVER "OGR/OpenFileGDB"
        MIMETYPE "application/x-ogc­filegdb"
        FORMATOPTION "STORAGE=filesystem"
        FORMATOPTION "FORM=zip"
        FORMATOPTION "FILENAME=result.gdb.zip"
        FORMATOPTION "LCO:FID=FID"
    END

I ran into an issue where a single feature Id is being set to NULL. After checking various database queries and configs it looks like the issue is when a feature id is -21121 and data exported to a FileGDB. When using GeoJSON the Id is returned correctly.

I searched in the GDAL codebase and found that this is a "magic" number: https://github.com/search?q=repo%3AOSGeo%2Fgdal%20-21121&type=code

#define OGRUnsetMarker -21121

Is there any way round this other than using different Ids?

Thanks,

Seth



--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika


More information about the gdal-dev mailing list