make_EPSG = PROJ 6 database empty

293 views Asked by At

I tried to retrieve EPSG data, but it shows this error

> library(rgdal)
> EPSG<-make_EPSG()
Error in make_EPSG() : PROJ 6 database empty

i tried the to change with the if arguments that are in the package but it seems that didn´t work:

> EPSG <- try(make_EPSG())
Error in make_EPSG() : PROJ 6 database empty
> if (!inherits(EPSG, "try-error")) attr(EPSG, "metadata") 
> EPSG
[1] "Error in make_EPSG() : PROJ 6 database empty\n"
attr(,"class")
[1] "try-error"
attr(,"condition")
<simpleError in make_EPSG(): PROJ 6 database empty>

Any idea how to make it work?

1

There are 1 answers

0
VPA DRP On

I solved the same issue after some time looking for solutions.

  • 1.- Unistall everything R & RStudio.
  • 2.- Remove manually all the folders related to R (in users/documents....)
  • 3.- Install R-3.6.3. DO NOT install RStudio yet please 3.- Install rgdal, rgeos & sf packages as usual from R (not RStudio)
  • 4.- Execute in R terminal "update.packages(ask = FALSE, checkBuilt = TRUE)"
  • 5.- Install RStudio (for my RStudio-1.3.1093 worked)
  • 6.- Run RStudio and load rgdal library. Try to execute make_EPSG() now. Worked for me.

An last... when calling to CSR do not use CRS('init': 'epsg:4326') use CRS(SRS_string = 'EPSG:4326') instead.