[R-sig-Geo] problem in writing shapefiles with writePointsShape()

2011-08-08 Thread Jeff Ranara
-Original Message- From: Jeff Ranara [mailto:jeff.ran...@stockholmresilience.su.se] Sent: Monday, August 08, 2011 12:21 PM To: 'r-sig-geo@r-project.org' Subject: problem in writing shapefiles with writePointsShape() Hi folks, What am I missing here? Am I using old routines? Missing

[R-sig-Geo] Constructing Polygons using bboxes from SpatialPolygonsDataFrame

2011-08-08 Thread Cam Plouffe
Hi everyone, I'm trying to make a function that constructs rectangular polygons based on the bounding boxes of other polygons from a SpatialPolygonsDataFrame. I am having a number of errors right now, which I am unsure how to fix. My code is basically as follows: temp = bbox(spdf_u[1,]) temp =

Re: [R-sig-Geo] Constructing Polygons using bboxes from SpatialPolygonsDataFrame

2011-08-08 Thread Roger Bivand
On Mon, 8 Aug 2011, Cam Plouffe wrote: Hi everyone, I'm trying to make a function that constructs rectangular polygons based on the bounding boxes of other polygons from a SpatialPolygonsDataFrame. I am having a number of errors right now, which I am unsure how to fix. My code is basically

Re: [R-sig-Geo] Constructing Polygons using bboxes from SpatialPolygonsDataFrame

2011-08-08 Thread Cam Plouffe
Thanks Roger. This does exactly what I want, and also gives me an understanding of the *apply functions, which will definitely come in handy. Cam On Mon, Aug 8, 2011 at 11:56 AM, Roger Bivand roger.biv...@nhh.no wrote: On Mon, 8 Aug 2011, Cam Plouffe wrote: Hi everyone, I'm trying to

Re: [R-sig-Geo] problem in writing shapefiles with writePointsShape() - SKUMT!

2011-08-08 Thread Roger Bivand
On Mon, 8 Aug 2011, Jeff Ranara wrote: HI again, An update: Found two workarounds: 1. Dividing MVALTARX6C and MVALTARX3C by 1 so they're around the same order or magnitude as MVALTARX6 and MVALTARX3 respectively (both of which got written fine). Works for me since I am working with

Re: [R-sig-Geo] extracting and manipulating a RasterStack

2011-08-08 Thread Lyndon Estes
Hi Sara, The following is slightly different from what you are trying to do, but should give you an area value for cells of a given value, without having to stack your rasters: r - raster(ncol = 10, nrow = 10) res(r) - 10 # Giving it a square grid cell, which remakes raster into 18 rows 36

Re: [R-sig-Geo] problem in writing shapefiles with writePointsShape() - SKUMT!

2011-08-08 Thread Jeff Ranara
Thanks Roger -Original Message- From: Roger Bivand [mailto:roger.biv...@nhh.no] Sent: Monday, August 08, 2011 8:45 PM To: Jeff Ranara Cc: r-sig-geo@r-project.org Subject: Re: [R-sig-Geo] problem in writing shapefiles with writePointsShape() - SKUMT! On Mon, 8 Aug 2011, Jeff Ranara