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
Context for Issue:
I was trying to teach an intern how to create a spatialVector for a dataset, and we ran into the following error message when trying to read in the shapefiles:
> upstream_pid <- selectMember(dp, "sysmeta@fileName", "upstream_points.zip")
> shapefile <- arcticdatautils::read_zip_shapefile(mn, upstream_pid)
Error in arcticdatautils::read_zip_shapefile(mn, upstream_pid) :
Zipped directory must contain one and only one .shp file
Ways we tried to debug the issue:
There's only 1 pid for the upstream_pid object, so no doubles there
There's only 1 .shp file in the zip folder
The same .shp file can be read in properly using the sf::st_read() function that the read_zip_shapefile eventually calls in the function.
Tested the read_zip_shapefile function on a file from the Kapsar dataset, and didn't get an error. The main difference between these two is that the dataset we're trying to process has a .qpj file for QGIS.
Not sure if function is having explicit difficulty with the .qpj file from QGIS, but didn't have time to debug today. The read_zip_shapefile function can be found below.
Context for Issue:
I was trying to teach an intern how to create a
spatialVector
for a dataset, and we ran into the following error message when trying to read in the shapefiles:Ways we tried to debug the issue:
upstream_pid
object, so no doubles there.shp
file in the zip folder.shp
file can be read in properly using thesf::st_read()
function that theread_zip_shapefile
eventually calls in the function.read_zip_shapefile
function on a file from the Kapsar dataset, and didn't get an error. The main difference between these two is that the dataset we're trying to process has a.qpj
file for QGIS.Not sure if function is having explicit difficulty with the
.qpj
file from QGIS, but didn't have time to debug today. Theread_zip_shapefile
function can be found below.Function Code:
arcticdatautils/R/helpers.R
Lines 438 to 482 in d08d3e0
The text was updated successfully, but these errors were encountered: