1

The README for rgdal contains the following text:

file.show(system.file("README", package="rgdal"))

For additional drivers, users of the CRAN Windows and CRAN OSX binaries can either convert to an available GDAL driver externally, read using CRAN rgdal binary - here you factor out mismatches, especially 32/64-bit questions among others, and can check the stages of the workflow. You can script the first step in R through system(). The PATH environment variable will need setting correctly to detect the external software properly.

But I can't find more detail about how to accomplish this, or what is entailed in setting the PATH environment variable "correctly".

I realize that rgdal binaries exist, but I need access to the PostgreSQL/PostGIS driver, so the internal GDAL that is statically linked is insufficient.

  • I had to build RGDAL from scratch in order to get it to use a different version of GDAL on Windows. It wasn't a simple task, the build files were quite outdated and I had to edit a few things to get it to build. Most of the edits centered around the exports (.def) file not being populated correctly. – Evil Genius Jan 12 '14 at 13:03
  • Right, I've read the compile instructions and some ML conversations about compiling on Windows and it seems like a bear. That's why I'm hoping this section from the README means what I think it means, and that someone can point out how to do it. – Lee Hachadoorian Jan 12 '14 at 17:02
1

The answer is "No".

After poking around to see if changing the PATH led to rgdal finding the external GDAL (which it didn't) I reread the quoted section and came to the conclusion that what it is saying, somewhat obtusely, is that you should do the conversion completely externally. The steps would be:

  1. Identify a "bridge" format that rgdal's statically linked GDAL can read (e.g. ESRI shapefile).
  2. Use an external GDAL with additional drivers to convert your source format (e.g. PostGIS) to the bridge format.
  3. Read in from the bridge format with rgdal.

Not what I was hoping for.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.