[PROJ] Clarification on required contents of PROJ_DATA dir please

Even Rouault even.rouault at spatialys.com
Fri Dec 8 16:07:38 PST 2023


Simon,


> We do not currently redistribute anything from the separate 
> *proj-data* bundle, only the basic set of files that end up in 
> *.../share* from a PROJ make/install (*proj.db* and about 15 others, 
> e.g. *nad83*)
Well, hopefully you don't need to do accurate datum transformations ;-)
>
> This perhaps dates from when the full set of files was included in the 
> main bundle, but that is before my time, and obviously they have been 
> split out by you into a separate bundle for quite some time now, 
> presumably because of their size.
yes
>
> We have never had any issues (that we know of!) with failing to 
> interpret client data files, so evidently PROJ manages quite happily 
> without the additional files from the *proj-data* bundle but perhaps 
> we should be redistributing those as well?

PROJ will never error out about missing grid files by default, unless 
you set PROJ_ONLY_BEST_DEFAULT=YES ( Cf 
https://proj.org/en/9.3/apps/cs2cs.html#index-0) , or equivalent setting 
through proj.ini or the API (accessible 
from OGRCoordinateTransformationOptions::SetOnlyBest () in GDAL: 
https://gdal.org/doxygen/structOGRCoordinateTransformationOptions.html#a77fffa9f5f421c21c9104f6ba03885a5 
, or OCTCoordinateTransformationOptionsSetOnlyBest(): 
https://gdal.org/api/ogr_srs_api.html#_CPPv445OCTCoordinateTransformationOptionsSetOnlyBest35OGRCoordinateTransformationOptionsHb) 
.

If a grid is missing, in the default mode (only_best=no)n PROJ will 
fallback to whatever other less precise transformations it has, or do a 
"ballpark" transformation (no-op) in the worse case, which can be off by 
several tens of meters or more.

>
> If so, do we just combine the two sets of files into the same 
> *PROJ_DATA* directory?

Yes, you can have proj.db and the grids in the same directory. Or have 
different directories and mention them in PROJ_DATA using ';' separator 
on Windows, or ':' on Unix-like systems. (same convention as PATH). Cf 
https://proj.org/en/9.3/usage/environmentvars.html#envvar-PROJ_DATA


> Forgive me if there is documentation on this specific topic which I 
> have missed.
>
> Finally, is the latest *proj-data-1.16* compatible with PROJ 9.3.0 
> (which we have frozen on for our latest dependencies update) or must 
> we use the previous 1.14 from June? ...

Yes, that should work. Only new content has been added

> and what happened to 1.15? :)

proj-data 1.15 was released together with 9.3.0, and proj-data 1.14 with 
proj 9.2.1

Even

-- 
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20231209/17e46216/attachment.htm>


More information about the PROJ mailing list