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

Even Rouault even.rouault at mines-paris.org
Thu Jun 12 13:56:25 EDT 2008


Good point ! This was documented indeed, but due to a mismatch between the 
actual C++ signature and the signature in the documentation, doxygen didn't 
generate the documentation... Fixed now. Website will be updated soon.

Le Thursday 12 June 2008 18:16:01 Xavi Almolda, vous avez écrit :
> Thank you Tamas. This is exactly what I was looking for.
>
> I wonder why this method does not appear in the documentation.
>
> Regards,
>
> Xavi
>
> On Thu, Jun 12, 2008 at 5:34 PM, Tamas Szekeres <szekerest at gmail.com> wrote:
> > 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
>
> _______________________________________________
> 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