-
Notifications
You must be signed in to change notification settings - Fork 36
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
Adding editable layer to a new project #59
Comments
@jshirokov-bs : including the error you see here would be helpful |
For editing, you need a dataset stored in a postgis DB which is added to your qgis project as a layer. Additionally, you need to set write permissions to the respective data resources in the admin gui - look at the demo edit_points/edit_lines/edit_polygons for an example. |
As a test example, I simply add the "edit_points" layer from the demo project (directly from postgre) to the new "world13" project , place the .qgs in the "scan" folder and start configuring services. After that, this error occurs. |
Are you using a pg service connection in the datasource for edit_points or are you using hostname/port/username/password? |
Something like this. I connect to Postgres, load a layer from the database, create a project and put it in "scan". Is that correct? |
No, you need to use a service definition (as defined in pg_service.conf), as the necessary connection information differs inside the docker from the host system (i.e. in the container the DB can be found at So rather than specifying
|
@manisandro
But after that, unfortunately, I can't connect to the database. |
QGIS isn't picking up your service definition. Either you have not restarted QGIS since changing your pg_service.conf, or you have added your service definition to file which is not picked up by the postgres library. The default location for the pg service configuration file for your user is (If you specify service, you don't need to specify host/port/database/user/password as they are specified in the service definition.) |
@manisandro |
The The service definitions for the host system need to be placed in your home directory as I wrote above. |
@manisandro |
Yes |
@manisandro
After that, I restarted QWC2 and tried to connect through the "Service". Nothing has changed. |
In order to test your connection to the local DB start with psql (and not QGIS). So from the commandline do this:
Only after you are able to connect in this way via psql to your local DB try to connect to it from QGIS. |
@tpo |
It is helpful :-D - it tells you that your DB and PGSERVICE configuration indeed works! |
I am guessing from the screenshots you posted: you are running QGIS on a windows machine? If that is the case then you need to put the pg_service.conf file under |
Also what is hidden by the "Enter Credentials" window? There are authentication settings that are not visible in the screenshot |
@tpo |
That error message is most likely accurate. Verify that the credentials you have specified for |
@jshirokov-bs Were you able to fix your issue? @RodolfoMontenegro Please open a new issue for your problem. |
Thank you @HusseinKabbout , I was able to fix the issue. |
Hello @jshirokov-bs |
Hello.
I can add a new project to QWC2 using WFS. But how can I add an editable layer to a new project? If I add an editable layer from a demo project to my own project from Postgres, an error occurs during configuration.
The text was updated successfully, but these errors were encountered: