You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the output file and layer destination are prespecified in 'the QGIS way', i.e. like ogr:dbname=world.gpkg table=norway or ogr:dbname=world.gpkg table=norway (geom) these are recognized well by the qgis_process command. The latter adapts to the way these parameters are seen in the processing tool dialog (from which they can be copied as JSON and fed to qgis_process and to qgis_run_algorithm() in R).
In its output, qgis_process transforms this output specification into a <dsn>|layername=<name> syntaxis.
However when passing the same QGIS syntaxis either as a regular qgis_run_algorithm() argument [1], or as JSON (typically copied from the QGIS processing tool dialog) [2], st_as_sf() fails to read the <dsn>|layername=<name> syntaxis of the output element(s).
Note: passing "world.gpkg|layername=except_norway" to qgis_process or (in R) qgis_run_algorithm() for the output is not a good option. It writes a GPKG named as world.gpkg|layername=except_norway.gpkg (which isn't a problem to st_as_sf(), then, but it's clearly not what we need).
The text was updated successfully, but these errors were encountered:
Since this is unique to qgis output as far as I know, we'll probably have to make a dedicated function for this in qgisprocess. I think strsplit(input, "|layername=", fixed = TRUE)[[1]] should do the trick?
If the output file and layer destination are prespecified in 'the QGIS way', i.e. like
ogr:dbname=world.gpkg table=norway
orogr:dbname=world.gpkg table=norway (geom)
these are recognized well by theqgis_process
command. The latter adapts to the way these parameters are seen in the processing tool dialog (from which they can be copied as JSON and fed toqgis_process
and toqgis_run_algorithm()
in R).In its output,
qgis_process
transforms this output specification into a<dsn>|layername=<name>
syntaxis.However when passing the same QGIS syntaxis either as a regular
qgis_run_algorithm()
argument [1], or as JSON (typically copied from the QGIS processing tool dialog) [2],st_as_sf()
fails to read the<dsn>|layername=<name>
syntaxis of the output element(s).A reprex for [2] is given in #74 (comment).
A reprex for [1] is below:
Created on 2022-01-31 by the reprex package (v2.0.1)
Session info
A suggested remedy will be added in PR #80.
Note: passing
"world.gpkg|layername=except_norway"
toqgis_process
or (in R)qgis_run_algorithm()
for the output is not a good option. It writes a GPKG named asworld.gpkg|layername=except_norway.gpkg
(which isn't a problem tost_as_sf()
, then, but it's clearly not what we need).The text was updated successfully, but these errors were encountered: