-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support additional files such as SVG symbols #23
Comments
Hi @olivierdalang, can you attach a sample file as well? (sometimes it can be worth a thousand words for the final developer 😄) |
Hi @olivierdalang as for QGIS-server standalone you have to set a I just push a commit to do that g3w-suite/g3w-suite-docker@1f0163e, now inside config/
├── g3w-suite
│ ├── overrides
│ │ ├── static
│ │ └── templates
│ ├── settings_docker_cadastre.py
│ └── settings_docker.py
├── _nginx
│ └── django_ssl.conf
├── nginx
│ └── django.conf
└── qgis
└── QGIS3.ini By default in this [svg]
searchPathsForSVG=/usr/share/qgis/svg/, /shared-volume/project_data/svg/ As you can see now you have toi create a folder inside This commit at now is on |
Ideally I'd like to not alter searchPathsForSVG, because there could be multiple different project using different SVGs with same names, which would result in conflicats (wrong symbol showing in a project). In QGIS desktop, it's possible to define relative path to SVGs, which works well if you keep your SVG next to your QGIS project file. But such a setup cannot be uploaded to G3W it seems (as QGIS projects are uploaded using a different process than files). In the mean time I could make it work by using relative paths mimicking the structure in the docker container
This way the path to symbols is |
@olivierdalang sorry for the delay in the response, I'll add it to documentation thanks. |
Moved in here from g3w-admin while waiting for the documentation to be updated. |
Not sure if this is not yet supported or not documented or if I got something wrong.
I have layers with custom SVG symbols defined with relative paths, like this:
myproject.qgs
refers to datasource using../project_data/mydata.geojson
and to svgs using../project_data/images/svg1.svg
.It works well in QGIS desktop. In G3W suite however, I could not find how to make the SVG symbols available. I thought I could just upload my svg symbols to the
shared-volume/project_data
with the file upload GUI, like done for datasources, but it doesn't work.I could make them load by copying my svg symbols to
shared-volume/media/project_data
, but that's not doable by users through the UI.Is there a way to achieve this ? Or could this feature be implemented ?
Worth noting that from what I understand, unfortunately the QGIS files get rewritten by g3w-admin to alter the datasource paths. A similar approach would not work for advanced use cases for SVGs (for instance data-defined path to the SVG, that can't just be searched/replaced). I think what is needed is either to be able to upload a project package instead of just a QGIS file (project package being a zipped folder of a QGIS project with arbitrary files), or to document what relative paths structures should be used for projects to be able to access files in
shared-volume/media/project_data
(I guess it's../../project_data/myimage.svg
)Is the way QGIS files are rewritten documented somewhere ? Is the structure of the
shared-volume
directory supposed to be stable in the future (in which case we could just use../../project_data
instead of../project_data
and you could maybe skip rewriting the QGIS file).Thanks for your inputs !
The text was updated successfully, but these errors were encountered: