[R-sig-Geo] write .flt format in R

Michael Sumner mdsumner at gmail.com
Tue Nov 12 06:31:42 CET 2013


You could use rgdal instead:

library(raster)
library(rgdal)
x <- raster(volcano, crs = "+proj=laea")
## so rather than
## writeRaster(x, "file.flt")
writeGDAL(as(x, "SpatialGridDataFrame"), "file.flt", drivername = "EHdr")

## see this for the drivers available
gdalDrivers()

But that format is not very well defined, so I would test carefully
that your target is satisfied.

See here for some info:
http://www.gdal.org/frmt_various.html#EHdr
http://geospaced.blogspot.co.uk/2011/12/reading-afripop-data.html


Cheers, Mike.

On Tue, Nov 12, 2013 at 3:43 PM, Dan Rosauer <dan.rosauer at anu.edu.au> wrote:
> Hi
>
> Can anyone advise on an R method to write a raster object to the ESRI .flt grid format?
>
> writeRaster accepted the *.flt filename, but silently handled it by actually saving to *.grd, *.gri files which are the DIVA format.
>
> I can do it by roundabout methods, eg writing to .asc and then converting in DIVA or ArcGIS.  But a direct method would save much time and fiddling.
>
> Thanks for your help.
>
> Dan
>
> ~~~~~~~~~~~~~~~~~~~~~~
> Dan Rosauer
> Postdoctoral Fellow
> Moritz Lab
> Ecology, Evolution & Genetics
> Research School of Biology
> Gould Building, Daley Road
> Australian National University
> Canberra ACT 0200
>
> +61 413 950 275 (mobile)
> +61 2 6125 1028 (office)
> dan.rosauer at anu.edu.au
>
> sites.google.com/site/danielrosauer
>
>
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo



-- 
Michael Sumner
Hobart, Australia
e-mail: mdsumner at gmail.com



More information about the R-sig-Geo mailing list