[gdal-dev] Best way to package and distribute GDAL data files
ari.jolma at gmail.com
Tue Feb 14 08:22:03 PST 2017
In your code you can manage the location where GDAL looks for the files
In my case I have Perl modules, which depend on the GDAL Perl module. In
a test scenario for the first module it needs to ask installation of the
GDAL Perl module, which needs to ask for GDAL itself to be installed.
Then GDAL is really private to the GDAL Perl module and the GDAL files
are not easy to find by downstream modules. I manage it so that the GDAL
Perl module installs the GDAL data files in a shared directory, whose
name downstream modules can find out by a known method (Perl module
called File::ShareDir). The module then pushes this to the GDAL finder,
and so GDAL can find its data files.
This is perhaps one code layer more than in your application but anyway
you need to arrange it so that the your installer stores the name of the
GDAL data directory somewhere it can find it in runtime.
Hope this helps,
14.02.2017, 17:12, Emmanuel d'Angelo kirjoitti:
> Thanks Ari for the interest!
> Unfortunately, my target is to ship for all 3 major OSes (linux,
> windows, macOS).
> Regarding my build system, everything is glued by cmake. Not sure if
> it's related, but I build (for now) GDAL as a dynamic lib and PROJ4 as
> a static one. Any change here is possible if it helps with the issue.
> Le 14 févr. 2017 à 15:52, Ari Jolma <ari.jolma at gmail.com
> <mailto:ari.jolma at gmail.com>> a écrit :
>> I think we need to know the OS you're using.
>> 14.02.2017, 16:48, Emmanuel d'Angelo kirjoitti:
>>> Dear list,
>>> I'm trying to package and distribute an application that relies
>>> internally on GDAL for some raster / vector manipulation.
>>> It may happen in some cases that a user of the application wants to
>>> take her outputs to a different coordinate system (typically from
>>> some national system to WGS84). As far as I can see, some of these
>>> transformations rely on the content of GDAL data files (such as
>>> pcs.csv or datum.csv).
>>> I can install these files locally and use the GDAL_DATA environment
>>> variable to find them from my application. However, on the user
>>> side, what's the recommended practice?
>>> Do I need to ensure that my users have a GDAL_DATA variable set too
>>> with the correct data files? I've looked at the build system files,
>>> but I couldn't find a way to set this path relative to my
>>> application (which would let me install these files inside the app
>>> package and distribute them with the application).
>>> Any hint to put me on the right track would be greatly appreciated.
>>> Best regards,
>>> gdal-dev mailing list
>>> gdal-dev at lists.osgeo.org
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org <mailto:gdal-dev at lists.osgeo.org>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev