[MapServer-dev] MapServer and PROJ Questions

Even Rouault even.rouault at spatialys.com
Sat Apr 15 04:00:30 PDT 2023


Hi Seth,

init=epsg:XXXX, as a way of doing a lookup in proj.db, is a legacy 
syntax that was kept only in PROJ >=6 for EPSG. For other authorities, 
PROJ only recognizes "AUTHORITY_NAME:CODE" for lookups in the database, 
which enforces the order axis of the CRS definition (so EPSG:4326 != 
init=epsg:4326 since the former uses lat, long, whereas the later uses 
long,lat). This might require changes in MapServer which is quite init= 
addict.


> 2. Everything works if I create a text file named ESRI and put it in the folder in the PROJ_DATA path. I also tried setting PROJ_DATA (and PROJ_LIB) to multiple folders to allow me to put custom projections in a different folder - as implemented at [2] and described at [3] - "Starting with PROJ 6, multiple directories can be specified. On Unix, they should be separated by the colon (:) character. on Windows, by the semi-colon (;) character."
>
> However this doesn't seem to pick up the custom projection file on Windows or Linux e.g. in the mapserver.conf file I set: PROJ_LIB "C:/MapServer/bin/proj9/share;C:/Temp"

When setting through MapServer, this goes to a different code path using 
proj_context_set_search_paths()/OSRSetPROJSearchPaths() which require to 
have done the tokenization, whereas if you set it through a regular 
environment variable, this is PROJ itself that does the tokenization.

Should be fixed per https://github.com/MapServer/MapServer/pull/6863

Even

-- 
http://www.spatialys.com
My software is free, but my time generally not.



More information about the MapServer-dev mailing list