<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello</p>
<p>The projections defined in the viewer config.json do not affect
the server, they are used only by the viewer.</p>
<p>If you want to add custom projections to the server, then
changing the profile `qgis.db` should be the way to go. If you set
QGIS_SERVER_LOG_LEVEL: 0, you should see in the log output which
db is being read, likely it isĀ <span style="font-family:monospace"><span
style="color:#000000;background-color:#ffffff;">/etc/qgis.db</span>.</span></p>
<p><span style="font-family:monospace">Hope this helps<br>
Sandro</span></p>
<div class="moz-cite-prefix">On 30.12.25 21:34, Benjamin Cahill via
qgis-qwc2 wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAG4F_iGG_T2r03xmwwiXPd7XgFgjwEmH09RQKcwWLWjkLmAXNA@mail.gmail.com">
<pre wrap="" class="moz-quote-pre">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
_______________________________________________
qgis-qwc2 mailing list
<a class="moz-txt-link-abbreviated" href="mailto:qgis-qwc2@lists.osgeo.org">qgis-qwc2@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-qwc2">https://lists.osgeo.org/mailman/listinfo/qgis-qwc2</a>
</pre>
</blockquote>
</body>
</html>