[R-sig-Geo] Boundary of SpatialGridDataFrame ?

Roger Bivand Roger.Bivand at nhh.no
Fri Oct 26 15:01:30 CEST 2007


On Fri, 26 Oct 2007, Agustin Lobo wrote:

> Is it possible to get the boundary polygon
> of a SpatialGridDataFrame object resulting from
> a geotif image imported through rgdal?

bbox()? The boundary of a SpatialGrid is by definition a rectangle, and 
bbox() reports the full extent of the raster. The values then need 
repeating to get the five coordinates for a rectangle polygon.

Roger

>
> My goal is to divide that rectangle
> into two polygons defined by a
> "SpatialLinesDataFrame" object (shp imported through
> readOGR) and then overlay on the SpatialGridDataFrame object
> to extract raster values from each polygon and compare.
>
> Thanks!
>
> Agus
>

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no




More information about the R-sig-Geo mailing list