[MapServer-users] Switch custom projection from PROJ 7 to PROJ 9 (from flat epsg file to aux database)
Michal Seidl
michal.seidl at gmail.com
Tue Jul 14 07:24:38 PDT 2026
Hello,
after some more deep reading and searching I have found, probably not
perfect but working solution. If I understand situation main problems are:
- Mapserver itself makes in some cases some preprocessing before calling
PROJ API mainly it changes <AUTH>:<CODE> to init=<AUTH>:<CODE>
- PROJ 9.x carries differently <AUTH>:<CODE> and init=<AUTH>:<CODE> and
init=<AUTH>:<CODE> is really deprecated and in some situation forbidden
- PROJ 9.x looks for EPSG:<code> always in main proj.db so aux.db does
not help
So the solution is:
- copy original proj.db into some user location
- set this location with PROJ_DATA in /etc/mapserver.conf
- create alias for EPSG:5514 as EPSG:102067 in proj.db with following SQL
INSERT INTO projected_crs
(
auth_name,
code,
name,
description,
coordinate_system_auth_name,
coordinate_system_code,
geodetic_crs_auth_name,
geodetic_crs_code,
conversion_auth_name,
conversion_code,
text_definition,
deprecated
)
SELECT
'EPSG',
'102067',
'Legacy EPSG:102067 Krovak',
description,
coordinate_system_auth_name,
coordinate_system_code,
geodetic_crs_auth_name,
geodetic_crs_code,
conversion_auth_name,
conversion_code,
NULL,
0
FROM projected_crs
WHERE auth_name='EPSG'
AND code='5514';
Best regards Michal S.
More information about the MapServer-users
mailing list