vendredi 23 janvier 2015

OGR2OGR FileGDB 2 other format with -SQL query change structure


I'm using GDAL 1.11.1 with ESRI FileGDB Driver, GDB version 10.x.


When I use ogr2ogr, my goal is to sort differently my fields and in some case, to rename them. The problem is when I call FileGDB driver to an other format, my table structure change for every strings.


For example:



  • Input FileGDB :string field, 3 of length

  • Output FileGDB:string field, all fields are set to 0 (ogrinfo) or 65536 (ArcGIS 10.1)

  • Output SHP:string field, every field is set to 80 (by ogrinfo)


here my cmd. ogr2ogr -f "ESRI Shapefile" test2.shp pee_ori.shp -sql "select an_origine from pee_ori"


I have tried to do an ALTER TABLE nation ALTER COLUMN myfield2 TYPE character(15) but it's do not work on FileGDB?


Any ideas?





Aucun commentaire:

Enregistrer un commentaire