qgis / qwc2-demo-app

QWC2 demo application
Other
243 stars 155 forks source link

Import layers to qwc2 #434

Closed Azures49 closed 1 year ago

Azures49 commented 1 year ago

Hello, I have the following questions about working with qwc2:

  1. How can I upload editable layers to my project, which I added to the scan folder in docker?
  2. How can static layers be loaded? Is it possible to put the layers of the shape format in a directory in the docker so that they are displayed?
  3. Why do all dependencies collapse when changing any configuration when writing an image in docker?
  4. At the moment, in order to form your full-fledged resource, you need to make all the configuration in the configuration files manually, or can this be done via qwc_admin on the web?
  5. At the moment qwc2 only works through docker? and only on linux?
manisandro commented 1 year ago
  1. How can I upload editable layers to my project, which I added to the scan folder in docker?

See https://github.com/qwc-services/qwc-docker#editable-layers for some pointers

  1. How can static layers be loaded? Is it possible to put the layers of the shape format in a directory in the docker so that they are displayed?

Just place your geodata next to your QGIS project, or in a location which is resolvable within the docker volume. The only requirement is that QGIS Server can locate the geodata when it reads the project, QWC2 does not place any further requirements.

  1. Why do all dependencies collapse when changing any configuration when writing an image in docker?

Can you explain better what you mean here?

  1. At the moment, in order to form your full-fledged resource, you need to make all the configuration in the configuration files manually, or can this be done via qwc_admin on the web?

You just need to provide a tenantConfig.json, the config-generator, invokable from the qwc-admin-gui, will generate the configuration files.

  1. At the moment qwc2 only works through docker? and only on linux?

No, qwc-docker is just a ready-to-use setup we provide, but you are free to use any other setup. Ultimately you need a webserver and a wsgi component for executing the python services (i.e. uwsgi / apache + mod_wsgi / ...).

Azures49 commented 1 year ago

image when uploading a project with static files to the scan folder, it gives this error

manisandro commented 1 year ago

Your project likely contain a datasource which is not resolveable within the docker container.

Azures49 commented 1 year ago

I added one shapefile to this project, the project was saved in qgs format

manisandro commented 1 year ago

Is the shape file placed next to qgis project or referenced as a relative path to the qgis project inside the mounted volumes/qgs-resources directory tree?

Azures49 commented 1 year ago

Look, I have a docker deployed on my virtual machine (ubuntu) with qwc services installed, qgis desktop is installed on windows, I throw a static layer into the project, save the project, then I move it to /qwc-docker/volumes/qgs-resources/scan/ here I stack the project and layers

manisandro commented 1 year ago

Well, clearly QGIS Server cannot find the datasets referenced by the project, or it would not complain. So double check what I wrote above.

manisandro commented 1 year ago

I'm assuming this is since fixed given the followup question in #435.