Skip to content
Back to formatted view

Raw Message

Message-ID: <87vc9ui2ul.fsf@pobox.com>
Date: 2013-02-15T05:05:22Z
From: Tom Roche
Subject: how to display a projected map on an rasterVis::layerplot?

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>