qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.65k stars 3.01k forks source link

`qgis_process` command copied from processing algorithm window is incorrectly formatted. #53342

Open ar-siddiqui opened 1 year ago

ar-siddiqui commented 1 year ago

What is the bug or the crash?

The qgis_process command copied from Processing Algorithm Dialog Box is incorrectly formatted. Running them in OSGeo4W Shell is giving the following error:

image

qgis_process run native:buffer --distance_units=feet --area_units=mi2 --ellipsoid=EPSG:7019 --INPUT='C:/Users/asiddiqui/Documents/Projects/va-pluvial/aoi.gpkg|layername=aoi' --DISTANCE=10 --SEGMENTS=5 --END_CAP_STYLE=0 --JOIN_STYLE=0 --MITER_LIMIT=2 --DISSOLVE=false --OUTPUT='C:/Users/asiddiqui/Documents/Projects/va-pluvial/buffer.gpkg'

'layername' is not recognized as an internal or external command, operable program or batch file.

Steps to reproduce the issue

Same as above ^^.

Versions

QGIS version 3.28.7-Firenze QGIS code revision fedae0eb52 Qt version 5.15.3 Python version 3.9.5 GDAL/OGR version 3.7.0 PROJ version 9.2.0 EPSG Registry database version v10.082 (2023-02-06) GEOS version 3.11.2-CAPI-1.17.2 SQLite version 3.41.1 PDAL version 2.5.3 PostgreSQL client version unknown SpatiaLite version 5.0.1 QWT version 6.1.6 QScintilla2 version 2.13.1 OS version Windows 10 Version 1909

Active Python plugins processing 2.12.99

Supported QGIS version

New profile

Additional context

There are other formatting issues as well. I have to modify commands various times to have them run without errors.

agiudiceandrea commented 1 year ago

@ar-siddiqui, as a workaround, doesn't just replacing the single quotes with double quotes fix the issue?

ar-siddiqui commented 1 year ago

@ar-siddiqui, as a workaround, doesn't just replacing the single quotes with double quotes fix the issue?

It does, but I still reported the error. Thanks

agiudiceandrea commented 1 year ago

@ar-siddiqui, I asked because you also wrote that:

There are other formatting issues as well. I have to modify commands various times to have them run without errors.

so I supposed the single quotes issue may not be the only formatting issue in the qgis_process command copied from Processing Algorithm Dialog Box. If it is not the only formatting issue, please specify also the other formatting issue, so they can be fixed altogether.