[gdal-dev] S57 field definition incorrect
Frank Warmerdam
warmerdam at pobox.com
Wed Jan 14 02:06:00 EST 2009
ogr user wrote:
> I am using OGR to load S57 format files and it appears that at least for
> some fields the field type is incorrectly returned by OGR. Fields of
> type "integer list" (denoted L in s57attributes.csv, enumeration list)
> are identified as string type by OGRField::GetType(). The problem with
> that is that OGRFeature::GetFieldAsIntegerList then refuses to return a
> list of integer values for these fields (returns NULL).
>
> Is this a bug, feature or am I doing something incorrectly?
Dear OGR User,
It appears the S57 code deliberately treats list attributes as simple
strings. While this may have been a poor choice, I hesitate to change it
at this point for fear of breaking fragile software built on this driver
(notably the FME S-57 reader).
My suggestion is that you fetch it as a string, and parse the integers
out yourself.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the gdal-dev
mailing list