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

qgep:extractlabels_interlis cannot be launched from cmd line #129

Open
sjib opened this issue Jun 21, 2023 · 2 comments
Open

qgep:extractlabels_interlis cannot be launched from cmd line #129

sjib opened this issue Jun 21, 2023 · 2 comments

Comments

@sjib
Copy link
Contributor

sjib commented Jun 21, 2023

Describe the bug
When trying to use INTERLIS label export as batch command you have to have a valid LABELS_FILE at hand for the cmd call in qgepqwat2ili:

python -m qgepqwat2ili qgep [-h] [--selection SELECTION] [--labels_file LABELS_FILE] [--recreate_schema] [--skip_validation] [--pgservice PGSERVICE] [--log] {import,export} path

In the processing tools there is an extra processing tool qgep:extractlabels_interlis at hand that can be launched before.
QGIS allows to launch processing tools also from the cmd line when launched via the OSGEO4W Shell (see 26.8. Using processing from the command line)

The problem is, that when running eg. qgis_process run qgep:extractlabels_interlis

C:\Program Files\QGIS 3.30.3>qgis_process run qgep:extractlabels_interlis --distance_units=meters --area_units=m2 --ellipsoid=NONE --OUTPUT='G:/psql/Export/test5.geojson' --RESTRICT_TO_SELECTION=false --SCALES=0 --SCALES=1 --STRUCTURE_VIEW_LAYER='service='\''pg_qgep_romo'\'' key='\''obj_id'\'' estimatedmetadata=true srid=2056 type=Point checkPrimaryKeyUnicity='\''1'\'' table="qgep_od"."vw_qgep_wastewater_structure" -- (situation_geometry)' --REACH_VIEW_LAYER='service='\''pg_qgep_romo'\'' key='\''obj_id'\'' srid=2056 type=CompoundCurveZ checkPrimaryKeyUnicity='\''1'\'' table="qgep_od"."vw_qgep_reach" (progression_geometry)' --CATCHMENT_AREA_VIEW_LAYER='service='\''pg_qgep_romo'\'' key='\''obj_id'\'' srid=2056 type=CurvePolygon checkPrimaryKeyUnicity='\''0'\'' table="qgep_od"."catchment_area" (perimeter_geometry)'

we get the information: Algorithm qgep:extractlabels_interlis not found!

When checking the available processes qgep:extractlabels_interlis is not listed.

To Reproduce
Exact steps to reproduce the behavior:

  1. Go to your qgis installation directory
  2. Click on 'OSGeo4W.bat'
  3. Start command
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots / data
If applicable, add screenshots or data to help explain your problem.

Desktop (please complete the following information):

  • QGEP plugin version 1.6.1
  • QGEP datamodel version 1.6.1
  • QGEP project file version
  • QGIS Version
  • OS Windows 10

Additional context
It looks like there is no entry in the metadata.txt
Only installed plugins that advertise hasProcessingProvider=yes in their metadata.txt file are recognized and can be activated or loaded by qgis_process tool.
(see https://docs.qgis.org/3.28/en/docs/user_manual/processing/standalone.html)

This shows how to add processing_provider to a plugin;
https://docs.qgis.org/3.28/en/docs/pyqgis_developer_cookbook/processing.html#updating-a-plugin

The folder with processing providers e.g. the swmm function exist;
https://github.com/QGEP/qgepplugin/tree/master/qgepplugin/processing_provider

But the qgep:extractlabels_interlis code is in another folder processing_algs:
https://github.com/QGEP/qgepqwat2ili/blob/master/qgepqwat2ili/processing_algs/extractlabels_interlis.py

@sjib
Copy link
Contributor Author

sjib commented Jun 21, 2023

qgis_process plugins enable qgepplugin
qgis_process or qgis_process-qgis-ltr plugins

Sometimes only
C:\Program Files\QGIS 3.28.4\bin>qgis_process-qgis-ltr plugins works in the shell and C:\Program Files\QGIS 3.28.4\bin>qgis_process plugins

Seems to be depending how qgis was installed (standalone or with OSGeo4W setup.
I am not sure if there is a difference or not.
With the plugins command it can be checked what plugins are available
The command list can be used to get a list of all available providers and algorithms -> qgep:extractlabels_interlis is not listed.

@sjib
Copy link
Contributor Author

sjib commented Jun 21, 2023

@tproduit Any hint what would need to be adapted?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant