Displaying 2 results from an estimated 2 matches for "map2spatiallin".
Did you mean:
map2spatiallines
2013 Feb 13
1
[lattice] display a projected map on a layerplot
...: 1
## Get US state boundaries in projection units.
state.map <- maps::map(
database="state", projection="lambert", par=c(33,45), plot=FALSE)
# parameters to lambert: ^^^^^^^^^^^^
# see mapproj::mapproject
state.map.shp <-
maptools::map2SpatialLines(state.map, proj4string=lcc.crs)
pdf(file=lcc.pdf)
rasterVis::levelplot(o3.raster, margin=FALSE
) + latticeExtra::layer(
sp::sp.lines(state.map.shp, lwd=0.8, col='darkgray'))
dev.off()
# change this as needed to view PDFs on your system
system(sprintf("xpdf %s", lcc.pdf))
# d...
2013 Apr 26
1
[newbie] how to find and combine geographic maps with particular features?
...$x <- map.lines.coords.IOAPI.x + extents.xmin
> map.IOAPI$y <- map.lines.coords.IOAPI.y + extents.ymin
> map.IOAPI$range <- c(
> min(map.IOAPI$x),
> max(map.IOAPI$x),
> min(map.IOAPI$y),
> max(map.IOAPI$y))
> map.IOAPI.shp <-
> maptools::map2SpatialLines(map.IOAPI, proj4string=CRS)
> return(map.IOAPI.shp)
> } # end project.M3.boundaries.for.CMAQ
The maps are then overlaid on data and plotted using package=rasterVis
http://cran.r-project.org/web/packages/rasterVis/
with code like
https://bitbucket.org/tlroche/gfed-3.1_global_to_aqmeii...