Skip to content
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

WebConnections not being added #101

Open
cefect opened this issue Jan 8, 2025 · 1 comment · May be fixed by #115
Open

WebConnections not being added #101

cefect opened this issue Jan 8, 2025 · 1 comment · May be fixed by #115
Assignees
Labels
bug Something isn't working

Comments

@cefect
Copy link
Collaborator

cefect commented Jan 8, 2025

Calling the command (Plugins > CanFlood > WebConnection) runs without error, however the connections are not added:

2025-01-08T15:08:29     INFO    cf.WebConnectAction.l: WebConnection
2025-01-08T15:08:29     INFO    cf.WebConnectAction.WebConnect: found config file: C:\Users\cef\AppData\Local\QGIS\QGIS3\profiles\dev/QGIS\QGIS3.ini
2025-01-08T15:08:29     INFO    cf.WebConnectAction.retrieve_fromFile: reading connection info fron 
              l:\09_REPOS\04_TOOLS\CanFlood\canflood\_pars\WebConnections.ini
2025-01-08T15:08:29     INFO    cf.WebConnectAction.retrieve_fromFile: retrieved 4 connection parameters from file 
              ['GAR15', 'NPRI', 'NHSL', 'AutomaticallyExtractedBuildings']
2025-01-08T15:08:29     INFO    cf.WebConnectAction.addAll: added 4 connections: 
              ['GAR15', 'NPRI', 'NHSL', 'AutomaticallyExtractedBuildings']
2025-01-08T15:08:29     INFO    cf.WebConnectAction.l: added 4 connections

This is supposed to add 4 connections to the Browser by appending some entries to the QGIS3.ini file. The .ini file seems to be updated as expected:

connections-arcgisfeatureserver\ECCC_NationalPollutantReleaseInventory_NPRI\url=https://maps-cartes.ec.gc.ca/arcgis/rest/services/NPRI_INRP/NPRI_INRP/MapServer
connections-arcgisfeatureserver\NRCan_NationalHumanSettlementLayer_NHSL\url=https://maps-cartes.services.geo.ca/server_serveur/rest/services/NRCan/nhsl_en/MapServer
connections-wms\NRCan_AutomaticallyExtractedBuildings\url="https://maps.geogratis.gc.ca/wms/automatic_extraction_building_footprint_en?request=getcapabilities&service=wms&layers=automatic_extraction_building_footprint_en&version=1.3.0&legend_format=image/png&feature_info_type=text/html"

When adding the connections manually, it looks like the syntax of the .ini file has changed (also NPRI seems to be broken).

I propose:

  1. finding a more native way of adding the connection (rather than editing the .ini file) that will be less sensitve to .ini syntax changes. i.e., some built-in Q command. If this can't be found, revise the .ini modification commands to match the current syntax.
  2. check the connections in WebConnections.ini to make sure they still work (if not, search for an alternate server for the dataset or delete)

Code is here.
Documentation is here

@cefect cefect added the bug Something isn't working label Jan 15, 2025
@cefect
Copy link
Collaborator Author

cefect commented Jan 15, 2025

@ceftanveer I think we'll need to fix this to get tutorial 5 to work

@ceftanveer ceftanveer linked a pull request Jan 26, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants