[gdal-dev] Checking for a NULL value in a field using OGR

Tamas Szekeres szekerest at gmail.com
Thu Jun 12 11:34:34 EDT 2008


You could probably use OGRFeature::IsFieldSet but I doubt if it is
properly handled by the driver for the numeric fields.

Best regards,

Tamas


2008/6/12 Xavi Almolda <xavi.almolda+OGR at gmail.com>:
> Hello,
>
> I am using OGR to read information from ESRI Shapefile files. I have a
> problem with empty or null fields. I need to know when a value for a field
> has not been set. Something like an isNull() or isSet() function.
> For example, if I read a value as integer from a field that is empty, the
> value returned is a 0. The same value is returned if the field has a value
> of 0.
>
> Is there any way to check for these empty or not set field values using OGR
> ?
>
> Thank you,
>
> Xavi
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>


More information about the gdal-dev mailing list