On Wed, 2 Dec 2015 at 06:34 Jonathan Greenberg <[email protected]> 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? library(raster) ## 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) { library(rgdal) summary(readGDAL("b.vrt")) } b.vrt has GDAL driver VRT and has 87 rows and 61 columns Object of class SpatialGridDataFrame Coordinates: 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 > [email protected] > http://lists.osgeo.org/mailman/listinfo/gdal-dev
_______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
