[R-sig-Geo] how to plot Raster*? problems with raster::plot, fields::image.plot
Tom Roche
Tom_Roche at pobox.com
Thu Nov 1 07:07:17 CET 2012
Both sets of problems (with raster::plot and fields::image.plot) are now
essentially solved. My main raster-related problems proved to be
* confusing the template Raster* produced by projectExtent(...) with
the Extent object that the template Raster* contains
* using a cited CRS, rather than querying the template input file
for its CRS
See details in the answer @ end of
http://stackoverflow.com/questions/13005181/r-how-to-set-the-display-bounds-of-a-rasterplot/
A minor problem with the map I'm using for raster::plot remains (details
at the end of the answer), as does the problem with setting the CRS
previously described @
https://stat.ethz.ch/pipermail/r-sig-geo/2012-October/016524.html
Reversing the column order of the data solves the fields::image.plot
problem completely: see function=plot.raster in
https://github.com/TomRoche/GEIA_to_netCDF/blob/master/plotLayersForTimestep.r
All code (including drivers providing a test fixture), data, downloads,
and README are available @
https://github.com/TomRoche/GEIA_to_netCDF
HTH, Tom Roche <Tom_Roche at pobox.com>
More information about the R-sig-Geo
mailing list