Message-ID: <1297793134419-6028652.post@n2.nabble.com>
Date: 2011-02-15T18:05:34Z
From: Robert J. Hijmans
Subject: How to draw grid contours within a map
In-Reply-To: <701436.7348.qm@web161412.mail.bf1.yahoo.com>
> In order to illustrate the spatial domain of the General Circulation Model
(GCM) output data I am using, I
> need to display some grids within a map. They need to be 2.5?x2.5? lat-lon
> over specific coordinates.
> Following, I create the "empty" grids to draw:
>library(raster)
>rprecip<-raster(xmn=-60,xmx=-50,ymn=-35,ymx=-25)
>res(rprecip)<-2.5
Thiago,
You can do this
rprecip[] <- 1
# (set cells you do not want to NA)
p <- rasterToPolygons(res)
plot(p)
Robert
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/How-to-draw-grid-contours-within-a-map-tp6027387p6028652.html
Sent from the R-sig-geo mailing list archive at Nabble.com.