This is an extended question of the following link : Multiply or Divide certain numbers on a projection file(?) of Japan

It works great with shapefiles but somehow it's not working well with FileGDB feature classes

Some of my layers are over 2GB; therefore, i had to store them as FileGDB feature class. I have installed FileGDB driver (using the latest version of GDAL) and modify the code shown in below

ogr2ogr -f "filegdb" -a_srs espg:4301 -dialect sqlite -sql "select scalecoords(geometry, 2.7777777777777777777777777777778e-7), ATTRIBUTES1, ATTRIBUTES2, from D:\NAME_VS_E.gdb\NAME_VS_E" D:\NAME_VS_E.gdb\test D:\NAME_VS_E.gdb\NAME_VS_E

and it returns an error "Unable to open datasource'D:\NAME_VS_E.gdb\NAME_VS_E' with the following drivers.

enter image description here

I have installed the driver though. It works great with

ogrinfo -so D:\NAME_VS_E.gdb

enter image description here


  • At least the SQL part has couple of errors. They may not be real but come from copy-paste-edit but anyway, there must not be comma before from in ATTRIBUTES1, ATTRIBUTES2, from and from must point to the layer name as it is reported by ogrinfo, so simply just NAME_VS_E. – user30184 Oct 10 '17 at 8:01
  • @user30184, oh thanks. I noticed that now. but still it shows it cannot open data source of my filegdb :( – Pil Kwon Oct 10 '17 at 8:03
  • The name of your filegdb is not D:\NAME_VS_E.gdb\NAME_VS_E. Because you use the -sql parameter you need to use just D:\NAME_VS_E.gdb. And as always in ogr2ogr syntax, the name of the datastore and the layer are separated with space. D:\NAME_VS_E.gdb NAME_VS_E should work, though not with -sql select that overrides the selection of layer. There is an even an example of the syntax in gdal.org/drv_filegdb.html. – user30184 Oct 10 '17 at 8:07
  • @user30184, i think i am getting closer to the answer. I made the OGR to make another FGDB (since i am not going to overwrite the layer) and scalecoorded it and it gives me another message. "no such column geometry" I think it gives me the error, since FGDB layer has different geometry characteristics from shapefile layer. – Pil Kwon Oct 10 '17 at 8:28
  • Does ogrinfo -so D:\NAME_VS_E.gdb NAME_WS_E show some other name for the geometry field? By gdal.org/drv_filegdb.html it might be "SHAPE". – user30184 Oct 10 '17 at 8:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.