[gdal-dev] Re: OGR FileGDB driver: Failed at creating table ... (General function failure.)

Hermann Peifer peifer at gmx.eu
Mon Sep 19 03:14:08 EDT 2011


On 16/09/2011 16:49, Paul Ramsey wrote:
> ...perhaps in the FGDB driver we can try and
> avoid using the WKT at all when we have a WKID available.

I just disabled the generation of the WKT element in my local copy of 
FGdbLayer.cpp [0]:   /* CPLCreateXMLElementAndValue(srs_xml,"WKT", wkt); */

If I now run: ogr2ogr -f filegdb out.gdb in.gdb -a_srs epsg:3035, the 
generated XML looks like [1], i.e. the only meaningful information about 
the ProjectedCoordinateSystem is: <WKID>3035</WKID>.

out.gdb is created without any error message and ogrinfo tells me that 
its SRS is EPSG:3035, see [2]. However, ArcCatalog 10 considers the same 
out.gdb to have an unknown spatial reference :-(

Hermann



[0]

http://trac.osgeo.org/gdal/browser/trunk/gdal/ogr/ogrsf_frmts/filegdb/FGdbLayer.cpp#L371

[1]

$ ogr2ogr -f filegdb out.gdb in.gdb -a_srs epsg:3035

   ...
   <SpatialReference xsi:type="esri:ProjectedCoordinateSystem">
     <XOrigin>-2147483647</XOrigin>
     <YOrigin>-2147483647</YOrigin>
     <XYScale>1000000000</XYScale>
     <ZOrigin>-2147483647</ZOrigin>
     <ZScale>1000000000</ZScale>
     <XYTolerance>0.0001</XYTolerance>
     <ZTolerance>0.0001</ZTolerance>
     <HighPrecision>true</HighPrecision>
     <WKID>3035</WKID>
   </SpatialReference>
   ...

[2]

$ ogrinfo -al -so out.gdb

OGR: OGROpen(out.gdb/0x10d7140) succeeded as FileGDB.
INFO: Open of `out.gdb'
       using driver `FileGDB' successful.

Layer name: eea_1Kgrid
Geometry: Multi Polygon
Feature Count: 9
Extent: (-17.000000, 28.000000) - (-17.000000, 28.000000)
Layer SRS WKT:
PROJCS["ETRS 1989 / LAEA",
     GEOGCS["ETRS89",
         DATUM["European_Terrestrial_Reference_System_1989",
             SPHEROID["GRS 1980",6378137,298.257222101,
                 AUTHORITY["EPSG","7019"]],
             TOWGS84[0,0,0,0,0,0,0],
             AUTHORITY["EPSG","6258"]],
         PRIMEM["Greenwich",0,
             AUTHORITY["EPSG","8901"]],
         UNIT["degree",0.0174532925199433,
             AUTHORITY["EPSG","9122"]],
         AUTHORITY["EPSG","4258"]],
     PROJECTION["Lambert_Azimuthal_Equal_Area"],
     PARAMETER["latitude_of_center",52],
     PARAMETER["longitude_of_center",10],
     PARAMETER["false_easting",4321000],
     PARAMETER["false_northing",3210000],
     UNIT["metre",1,
         AUTHORITY["EPSG","9001"]],
     AXIS["Y",NORTH],
     AXIS["X",EAST],
     AUTHORITY["EPSG","3035"]]
FID Column = OBJECTID
Geometry Column = SHAPE
CELLCODE: String (0.0)
Shape_Length: Real (0.0)
Shape_Area: Real (0.0)


More information about the gdal-dev mailing list