[gdal-dev] Error reading long numbers as integer

Ralf Suhr Ralf.Suhr at itc-halle.de
Tue Dec 7 03:37:25 EST 2010


Hello Even,

I changed the definition to String in gfs file and use the type text in 
postgresql.

I've tested with:
ogr2ogr -f "PGdump" /vsistdout/ nas_error_strschl.xml

ogr2ogr --config PG_LIST_ALL_TABLES YES -append -f PostgreSQL PG:"dbname=nas" 
nas_error_strschl.xml

Am Montag 06 Dezember 2010, 20:56:14 schrieb Even Rouault:
> Ralf,
> 
> > I have created a ticket for the NAS reader. Long numbers (13 digits) are
> > read as integer. Maybe there are more drivers who have the same trouble.
> 
> Yes, this is an issue that can be potentially found in other drivers. The
> situation could improve if/when RFC 31 / OGR 64bit integer is adopted.
> 
> For the time being, I've made a change in the GML driver so that it
> fallbacks to Real when it detects an integer that cannot fit into 32bit.
> Not ideal, but better than arbitrary truncation.
> 
> > I have tested some workarounds. Changing the attribut definition in gfs
> > file is successful, when destination driver is PGdump or Postgresql
> > (create mode).
> 
> Which change did you make exactly ? Change from Integer to Real ?
> 
> > With Postgresql driver as destination ogr2ogr convert the
> > 13 digits number always to integer in append mode and ignoring table
> > definition.
> 
> I'm a bit skeptical about that one. Which exact commands did you use ?
> 
> > I tested with gdal SVN21189.
> > 
> > Gr
> > Ralf



More information about the gdal-dev mailing list