I ran into an issue a few days ago where an ogr_fdw foreign data wrapper in
postgis was throwing

[XX000] ERROR: AddToPROJ4SRSCache: could not parse proj4 string '+proj=lcc
+lat_1=31.88333333333333 +lat_2=30.11666666666667 +lat_0=29.66666666666667
+lon_0=-100.3333333333333 +x_0=699999.9998983998 +y_0=3000000 +datum=NAD83
+units=us-ft +no_defs ' unknown elliptical parameter name

See
http://postgis.17.x6.nabble.com/XX000-ERROR-AddToPROJ4SRSCache-could-not-parse-proj4-string-td5011978.html

I built Proj4 from source and removed all apt packages that depended on
proj4 and ensured that the relevant grids were installed. To my great
astonishment and misery, the issue still persisted, so I assumed it was a
bug in ogr_fdw gdal/postgis/gdal. After several days of  trying different
version combinations to try to determine which package was responsible, I
still received the same error. Finally, I recompiled GDAL without ESRI FGDB
support and to my amazement everything worked perfectly.  I thought to
myself, how could the FGDB library possibly affect proj4 when there is no
libproj.so that comes with it? Then I found this:

http://osgeo-org.1560.x6.nabble.com/gdal-dev-compiling-gdal-with-esri-file-gdb-td5311469.html

Apparently the ESRI FGDB library is packaged in a nonstandard way that
results in proj4 being embedded in the .so file -like a tapeworm -wreaking
silent havoc on all packages that depend on proj4.

To save others from this hellish debugging process, it might be worth
either checking for the FGDB libraries and throwing an error if GDAL is
configured without --wtih-static-proj4=location or setting that option by
default.
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to