[R-sig-Geo] write.asciigrid
Roger Bivand
Roger.Bivand at nhh.no
Fri May 5 18:29:29 CEST 2006
On Fri, 5 May 2006, Andy Bunn wrote:
> > > I second Roger's recommendation for using rgdal. I've been
> > writing to and
> > > fro from img files with few problems. The only problem I have
> > with ArcGIS is
> > > that the statistics have had to be recalculated in Arc for
> > floats to get the
> > > display to work correctly. But, Arc has a batch statistics tool
> > that doesn't
> > > crash often (when a tool works reliably in Arc I'm surprised and pleased
> > > beyond reason). Keep up the good work Roger, Tim, Edzer and all the
> > > rest. -Andy
> >
> > Thanks for this input, Andy. Could you please flesh it out a little,
> > perhaps a run through from SpatialPixels/GridDataFrame to inside ArcGIS
> > (version?)? I'll try too, but if you have a well-trodden path ...
>
> library(sp)
> library(rgdal)
> data(meuse.grid)
> coordinates(meuse.grid) = c("x", "y") # promote to
> SpatialPointsDataFrame
> gridded(meuse.grid) <- TRUE # promote to SpatialPixelsDataFrame
> image(meuse.grid["dist"])
> writeGDAL(meuse.grid,"c:/data/research/tmp/meuse.grid.img",
> driver="HFA")
>
> Arc can display this img file without issue if the statistics are
> reclaculated using the Calculate Statistics under Raster. Note the lack of
> projcetion however!
Which ArcGIS version, please, and the exact (TM) steps you took - I've got
a kriging prediction *.img, but haven't got any further (sorry, my Arc
abilities are limited) - I don't "see" any Calculate Statistics or Raster
anywhere (and Arc just crashed, probably latency to the license server).
Roger
>
> -Andy
>
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no
More information about the R-sig-Geo
mailing list