[gdal-dev] Requesting new driver?

Michael Sumner mdsumner at gmail.com
Tue Dec 1 18:21:24 PST 2015

On Wed, 2 Dec 2015 at 06:34 Jonathan Greenberg <jgrn at illinois.edu> wrote:

> GDAL Developers:
> How do I go about requesting a new driver?  R's "raster" format is a
> pretty straightforward flat binary/header format (very similar to ENVI's).
> The specifications are laid out in:
> https://cran.r-project.org/web/packages/raster/vignettes/rasterfile.pdf

Hi Jonathan, FWIW, you can already do this via VRT. Can I suggest you flesh
out examples using the hdr() pathway?

## example basic raster from matrix
r <- raster(volcano)
## two layers (bands), out to native grd/gri format
b <- writeRaster(brick(r, r/2), "b.grd")

## round trip to VRT on the .gri binary
## and read in with rgdal
v <- hdr(b, "VRT")
if (v) {
b.vrt has GDAL driver VRT
and has 87 rows and 61 columns
Object of class SpatialGridDataFrame
      min       max
x 0.0e+00 0.9999998
y 2.5e-07 1.0000000
Is projected: NA
proj4string : [NA]
Grid attributes:

I know this only complicates the issue in some ways - since it won't work
for a lot of existing grd/gri files out there, but also does provide a
workaround as well as a neat way to build test cases.

Cheers, Mike.

I think this would be a nice addition, to allow more fluid work between R
> and the various gdal utilities.
> I'm cc'ing the developer of the format on this email, as an FYI.  Cheers!
> --jonathan
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20151202/344492e2/attachment.html>

More information about the gdal-dev mailing list