-
Notifications
You must be signed in to change notification settings - Fork 301
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
NULL error in sfc_from_ogr and segfaults with st_read #992
Comments
You might be bitten by the multiple GDAL/GEOS/PROJ version problem on linux, see https://github.com/r-spatial/sf#multiple-gdal-geos-andor-proj-versions-on-your-system . The ugly |
Thanks for the quick reply. I tried both your solution with I am not sure exactly how to go about removing everything related to both source and non-source versions of these packages. Is there any quick-ish way to find all of them and remove them and start from scratch with the source versions of the packages? Is geos the likely culprit since the |
Also, is there a way to verify that I have two of any of these packages installed? Before I installed the source version of |
I don't know. I only work with ubuntugis-unstable, or docker containers with only source installs, stopped trying anything else. |
You did reinstall sf after reinstalling the other libs, right? |
Yes I reinstalled If I am understanding the multiple versions issue correctly, then the error occurs because the version being liked to in
|
I uninstalled the When I upload an ESRI shapefile onto the server from my local machine and run It is very possible that I am missing something here, but it doesn't seem like this is an issue with multiple installs to me. |
OK, then it may not be R/sf. Try to open the same data source with |
I am not 100% sure how to use production server
docker imageOn a docker image with gdal and proj built from source none of these errors are occurring. all of the queries shown in the above section work perfectly fine against the exact same database. Just to illustrate:
The only difference that jumps out to me in the function calls is the driver. In the docker image I am using the one provided by Microsoft for using sql server on linux and in the production server I am using the drivers provided by RStudio for Connect. |
Yes, I meant |
I would have to agree with you. I will close this issue. Thanks for you help. |
I just wanted to leave a comment here in case any one else runs across a problem like this in the future. I was able to correctly pull data from the database when I changed what driver was being used. Updating the driver from the ones provided by RStudio Connect to the one provided by Microsoft for Ubuntu 16.04 worked for me. The link to the Microsoft driver is here |
Hi,
I am trying to use
sf
on an ubuntu 16.04 server to read layers out of a MSSQLSpatial database. I am able to connect to the database on the server andst_layers
returns the expected output. However, when I runst_read
I get the following error:The table has data and I know that because when I run the same command on my windows machine it returns the information as expected. Additionally, if I try to read a layer with polygon geometry columns, I get a segfault error and my R session crashes.
I was using the version of
gdal
that was available thoughppa:ubuntu-gis/ubstable
(2.2.2), however it was returning encoding errors when usingogrinfo
to read geometry columns. As a result, I builtgdal
(2.4.0) andproj
(5.2.0) from source to be able to read the data out of the database. Do you have any idea why these errors would be occuring?Ubuntu 16.04
Windows
Any help with this is greatly appreciated
The text was updated successfully, but these errors were encountered: