Hi,
I've a pull request sitting at https://github.com/OSGeo/PROJ/pull/4349
enabling users to embed the grids they want into libproj.so itself (or
potentially a transpiled build of it - I didn't try), with:
cmake .. -DEMBED_RESOURCE_FILES=ON
-DEMBED_GRIDS_DIRECTORY=/directory/with/grids
and build.
As the clickbait email subject suggests, you can potentially point at
the full proj-data directory. To build the resulting libproj, you'll
need like 6 GB of free disk space for the various temporary files and
about 16 GB RAM to build it with gcc (you may need to limit build
parallelism and not go to full -j$(nproc)), but after that, the usage
requirements of the library are normal (at least for regular library builds)
Usages mixing embedded grids, grids on the local file system, and remote
ones are possible.
Fun experiment to conclude:
# Get the offset of the us_nga_egm08_25.tif file within the shared library:
$ export GRID_OFFSET=$(printf "%d" $(echo "0x$(objdump -t lib/libproj.so
| grep us_nga_egm08_25_tif_data | awk '{print $1}' )"))
$ echo 2 49 | gdallocation -wgs84
/vsisubfile/${GRID_OFFSET}_-1,lib/libproj.so
Report:
Location: (4368P,984L)
Band 1:
Value: 44.6771507263184
Even
--
http://www.spatialys.com
My software is free, but my time generally not.
Butcher of all kinds of standards, open or closed formats. At the end, this is
just about bytes.
_______________________________________________
PROJ mailing list
PROJ@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/proj