When running R scripts in QGIS, upon loading my vector layer with ##Layer=vector
it automatically runs Layer <- st_read("path/to/shape.shp", quiet = True, stringsAsFactors = FALSE)
on my input layer
This prevents me from being able to use the raw filepath later on in my scripts. Is it still possible to get the raw filepath for an input layer from an R script in QGIS?
The output I want when I type Layer
is:
/path/to/myFile.shp
The output I get is:
Simple feature collection with 1 feature and 1 field
Geometry type: POLYGON
Dimension: XY
Bounding box: xmin: 581560.5 ymin: 5649045 xmax: 583123.1 ymax: 5649831
Projected CRS: NAD83(NSRS2007) / UTM zone 10N
id geometry
1 1 POLYGON ((583085.2 5649232,...
I'm not very familiar with st_read and I'm not sure if it stores the filepath or if I can retrieve it after st_read
has been run