[gdal-dev] ogr2ogr and reserved words
Ivan Lucena
ivan.lucena at princeton-ma.us
Fri Jul 13 06:59:41 PDT 2012
Thanks Even. Very good answer as always.
> -------Original Message-------
> From: Even Rouault <even.rouault at mines-paris.org>
> To: Ivan Lucena <ivan.lucena at princeton-ma.us>
> Cc: gdal-dev at lists.osgeo.org <gdal-dev at lists.osgeo.org>
> Subject: Re: [gdal-dev] ogr2ogr and reserved words
> Sent: Jul 13 '12 08:41
>
> Hi Ivan,
>
> >
> > Is there any trick to avoid creating field names with reserved words? For
> > example, a DBF from a shapefile can have field names like "long" and other
> > formats may not like it.
>
> It is up to the output driver to do whatever sanitizing it requires. This is
> already done in a lot of drivers. The last recollection I have is in the FGBD
> driver that modifies field names that match a list of reserved keywords. The
> shapefile driver will also truncate too long field names, etc.. A bunch of RDBM
> drivers have a LAUNDER creation option too. etc etc.
>
> I suspect your question might be related to the OCI driver ? Perhaps it should
> do something like the above if needed.
>
> ogr2ogr is able to deal with drivers that have an implementation of
> CreateField() that does a renaming/truncation/etc... of the source field name.
>
> You also have the possibility to use the AS capability of OGR SQL to do the
> renaming manually.
>
> >
> > Regards,
> >
> > Ivan
> > _______________________________________________
> > 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