[qgis-qwc2] How to use custom CRS in QWC2
Benjamin Cahill
bcahill at alertacademy.com
Tue Dec 30 12:34:21 PST 2025
Hello,
I am struggling to get a custom CRS working with QWC2. I added it in
config.json -> projections and it shows up in the web viewer as
expected, but every request to QGIS Server results in a 400 bad
request error and this error in the logs:
<ServiceException code="InvalidCRS">The CRS is not valid.</ServiceException>
It doesn't seem that the QGIS Server docker container is aware of the
custom CRS. I reviewed the docker volume mounts and none of them would
inform QGIS Server of the custom CRS (unlike qwc-map-viewer which
mounts /config which includes /default/mapViewerConfig.json where the
projections are put once the config is generated).
I noticed that the qwc-qgis-server container has qgis.db and srs.db
files in /usr/share/qgis/resources. I tried copying the qgis.db from
my desktop computer and mounting it as a volume to replace the
/usr/share/qgis/resources/qgis.db file, but that didn't help either.
What is the right way to add a custom CRS to the qwc-qgis-server container?
I could try editing the srs.db file directly or making a copy and
mounting it, but I don't know if that is the best solution.
Thank you for any help!
- Benjamin
More information about the qgis-qwc2
mailing list