-
Notifications
You must be signed in to change notification settings - Fork 303
z error (3 columns) with shapefile & 1.10 installation error #2081
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
Comments
I'm not sure if this will work (there are many issues with installing
and then in R: remotes::install_github("r-spatial/sf", configure.args = "--with-proj-lib=/usr/local/lib/") If that doesn't work, as workaround to the data loading problem, you can save the shapefile without the Z dimension in this way: gdal_utils(util = "vectortranslate",
source = "CoursEau_52_Pays de la Loire.shp",
destination = "new.shp",
options = c("-dim", "XY")) |
Thank you for your quick, detailed feedback. Unfortunately, there still seems to be a problem with the installation as I installed all the required dependencies with Homebrew, but still get the following error message when running the line of code you suggested :
It seems weird as I checked and the "proj" folder is indeed in /usr/local/lib. Any further suggestions? Sorry for the trouble! Also, for my personal knowledge, would you mind enlightening me on how to write multi-line code in Github's interface? |
I don't have macOS, so it's hard for me to help, but maybe you can find solution here.
Use a triple graves at the beginning and end of code block.
|
Okay many thanks for both, I will look into the resource you linked me to. I forgot to tell you but your solution for loading the data does work well. |
We just solved a version of this issue over in the tidycensus issues, if it's helpful: walkerke/tidycensus#501 (comment) |
Thanks, yes this can also be closed here. |
Uh oh!
There was an error while loading. Please reload this page.
Hi, I tried to load a shapefile that can be downloaded here and got the following error message:
Error in CPL_get_z_range(obj, 2) : z error - expecting three columns;
Given that I seemed not to be the first to have this problem, I followed the suggestion made by @kadyb in this error thread to install the 1.10 version of the package. However, it did not work. When I ran
install.packages("sf", repos = "https://r-spatial.r-universe.dev")
I got the following message:I then ran
remotes::install_github("r-spatial/sf")
and got:[Sorry I cannot manage to input multi-line code in Github's interface]
Would anyone be able to help, either by guiding me to install the 1.10 version of the package, or finding an alternative fix to the initial error message when loading the shapefile ?
Many thanks,
The text was updated successfully, but these errors were encountered: