fastr icon indicating copy to clipboard operation
fastr copied to clipboard

`sf` is Installed, but not Working Properly

Open ismailsunni opened this issue 5 years ago • 0 comments

From #116 , I can install sf by using GraalVM docker image. See my Dockerfile here that based on here.

Unfortunately, I got a problem when running simple script like below.

Run the container:

docker run  -it --rm ismailsunni/fastr-3.6.1-oracle-geospatial R

The problem with this code:

library('sf')
nc_gpkg_file = system.file("gpkg/nc.gpkg", package="sf")
nc_gpkg_file # /opt/graalvm-ce-java8-19.3.0/jre/languages/R/library/sf/gpkg/nc.gpkg
file.exists(nc_gpkg_file)  # TRUE
 read_sf(nc_gpkg_file)

Error message:

Cannot open data source /opt/graalvm-ce-java8-19.3.0/jre/languages/R/library/sf/gpkg/nc.gpkg
Error in CPL_read_ogr(dsn, layer, query, as.character(options), quiet,  :
  Open failed.

Another error is with shp file:

nc_shp_file = system.file("shape/nc.shp", package="sf")
read_sf( nc_shp_file)

It will give this error:

Simple feature collection with 100 features and 14 fields
geometry type:  MULTIPOLYGON
dimension:      XY
bbox:           xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965
epsg (SRID):    4267
proj4string:    +proj=longlat +datum=NAD27 +no_defs
An internal error occurred: "should not reach here: should not be null"
Please report an issue at https://github.com/oracle/fastr including the commands and the error log file '/home/docker/fastr_errors_pid6.log'.

And this is the fastr_errors_pid6.log

Any idea how to fix this?

Thanks!

ismailsunni avatar Jan 23 '20 21:01 ismailsunni