[gdal-dev] RFC 29: OGR Set Desired Fields
Martin Dobias
wonder.sk at gmail.com
Wed Jul 21 09:53:19 EDT 2010
On Wed, Jul 21, 2010 at 3:31 PM, Jez Walters <Jez.Walters at ipl.com> wrote:
> Martin,
>
>
> I may be misunderstanding how the API works (I'm not actually using it myself), but if someone wants to parse a given layer of the OS MasterMap vector data that is divided into chunks they can't use fixed field numbers, because the field order varies between chunks.
>
> For example, suppose I want to only extract the 'physicalPresence' field from the 'TopographicArea' layer. Using your current proposed API I would have to sometimes specify to extract field 10 and sometimes to extract field 11, depending on which chunk I'm reading.
Well, then this should be probably handled better in the underlying
GML driver...
> This CAN be accommodated of course (although it's rather fiddly), but the problem disappears if field names are used, as field names don't change between chunks.
I think it's rather easy to find out what field index is bound with
each field name. Passing field indexes makes more sense to me as OGR
internally works with field indexes, not field names.
Anyway, if you only use command line tools and do not develop
applications/libraries with OGR API, the proposed RFC doesn't affect
you at all.
Regards
Martin
More information about the gdal-dev
mailing list