[FWTools] ogr2ogr: formating columns

Frank Warmerdam warmerdam at pobox.com
Tue Nov 1 09:57:02 EST 2005

On 11/1/05, "Möckel, Alexander" <Alexander.Moeckel at ibykus.de> wrote:
> Hello,
> I'm using ogr2ogr to convert data to ESRI-Shapefile. An additional DBF File is also created. In the input gml File I have a token IDENT with such values: 91-2005- and a token DAT with such values: 01.11.2005. After converting in the DBF File these token are both columns of type number, and the values are 91.0 and 1.11. Is there any possibility, to tell ogr2ogr that the first token should be a string and the second a date column?


After translating the GML file you should see that OGR has written
a .gfs file associated with the .gml file.  If you manually edit this
you should be able to find the field names, and their associated types.
Try changing the contents of the <Type> tag from Real or Integer
to String.   Then re-run the translation after deleting the old output.

Unfortunately the OGR data model does not include date fields, so
there is no way to make OGR produce .dbfs with proper dates.

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 FWTools mailing list