[R-sig-Geo] how to display a projected map on an rasterVis::layerplot?

Tom Roche Tom_Roche at pobox.com
Fri Feb 15 06:05:22 CET 2013


Please advise me regarding overlay of an LCC-projected map on `raster`
data plotted by `rasterVis::layerplot`. What I mean, why I ask:

As discussed in detail @

http://stackoverflow.com/questions/14865507/how-to-display-a-projected-map-on-an-rlatticelayerplot

(more detail than is feasible for an email post) I'm trying to overlay
LCC-projected data from a netCDF file with an LCC-projected map. The
netCDF uses the IOAPI convention (described in link), and also manages
to hit yet again the `raster` filename-extension problem. (Dunno why,
but that's twice in one week for me--bad karma?) The data's horizontal
extents are CONUS, so I'm looking for an LCC CONUS map.

In one example (in the link above), I use CRAN package=M3 to get
(basically) a matrix of coordinates

map.lines <- M3::get.map.lines.M3.proj(
  file=lcc.file, database="state", units="m")

and feed that to old-style graphics. But I'd much prefer to make this
work like the other example, which resembles other code I have that is
using `rasterVis::layerplot`. Unfortunately that other code is using
unprojected/lon-lat data, and I must also handle projected (probably all
LCC) data.

TIA, Tom Roche <Tom_Roche at pobox.com>



More information about the R-sig-Geo mailing list