Re: [R-sig-Geo] subsetting polygon display

2010-11-01 Thread Edzer Pebesma
if object states is of class SpatialPolygons or of class SpatialPolygonsDataFrame, use plot(states[1,]) you can find out by asking class(states) On 11/01/2010 07:42 PM, Peter Larson wrote: Hello all, This is probably a completely stupid question, but how does one subset a polygon data set

Re: [R-sig-Geo] subsetting a SpatialGridDataFrame image.SpatialGridDataFrame

2010-08-14 Thread Edzer Pebesma
On 08/13/2010 03:33 PM, Patrick Giraudoux wrote: Thank you both, that is very clear now. SpatialPixelsDataFrame objects can be indexed as a data frame, but not SpatialGridDataFrame where row, col, band must be specified (thanks also not to have written, please read the doc, which was all

Re: [R-sig-Geo] subsetting a SpatialGridDataFrame image.SpatialGridDataFrame

2010-08-13 Thread Nikhil Kaza
you mean chinatemput...@data[idx,] ? If you want to subset the grid itself, look at the examples for SpatialGridDataFrame class # the following is weird, but illustrates the concept of row/col selection: data(meuse.grid) # only the non-missing valued cells fullgrid(meuse.grid) = TRUE

[R-sig-Geo] subsetting shapefile polygons with separate table criteria

2010-01-06 Thread Noli Sicad
# Subseting shapefile before merging tables - join table I realised that deleting the polygon with does match wit the record is not possible since, I can read the shapefile at all. But still I need to know how to delete / subset polygons. I think this is more workable. 1. Read shapefile

[R-sig-Geo] subsetting Spatial*DataFrame

2009-07-03 Thread Agustin Lobo
I apologize for raising the same topic from time to time, but each time I have to subset Spatial*DataFrame objects (where * stands for polygons, lines or points) I get some problems. Last year Roger was kindly advising: Just think of Spatial*DataFrame objects as data.frame objects and things

Re: [R-sig-Geo] subsetting Spatial*DataFrame

2009-07-03 Thread Edzer Pebesma
Thanks, Augusting for pointing out a flaw in the [ methods for Spatial*DataFrames. To be really honest, I didn't even know that you could select rows by ID this way. After 16 years of using S! I'll look into it when I get the chance; this may however take (quite) a while. -- Edzer Agustin Lobo

[R-sig-Geo] subsetting SpatialGridDataFrame

2009-05-18 Thread milton ruser
Dear all, I have a SpatialGridDataFrame which I read from grass myrast-readRAST6(DRENVAL) Now I attrib a sequential number for each pixel with: myrast @ data[[1]]-1:dim(myrast @ data)[1] Now I need to select record by record, from 1 to N, get the bbox() from each record, set the g.region

Re: [R-sig-Geo] Subsetting a spatial grid

2008-12-11 Thread Edzer Pebesma
For SpatialGridDataFrames, row and col selection can be done by object[firstrow:lastrow, firstcol:lastcol,] after the last , you can optionally select attributes. -- Edzer Rob Robinson wrote: Help - please! :-) I have what I thought was a really simple problem. I have a raster image of

[R-sig-Geo] Subsetting a spatial grid

2008-12-10 Thread Rob Robinson
Help - please! :-) I have what I thought was a really simple problem. I have a raster image of satellite data from which I would like to extract an arbitrary (but simple rectangular) portion for subsequent analysis (which I'll need to do for many images). I have the data as a (projected)

Re: [R-sig-Geo] Subsetting a spatial grid

2008-12-10 Thread Dylan Beaudette
On Wednesday 10 December 2008, Rob Robinson wrote: Help - please! :-) I have what I thought was a really simple problem. I have a raster image of satellite data from which I would like to extract an arbitrary (but simple rectangular) portion for subsequent analysis (which I'll need to do for

Re: [R-sig-Geo] subsetting

2008-10-27 Thread Hengl, T.
-Original Message- From: Edzer Pebesma [mailto:[EMAIL PROTECTED] Sent: Fri 24/10/2008 5:24 PM To: Hengl, T. Cc: 'Pieter Beck'; r-sig-geo@stat.math.ethz.ch Subject: Re: [R-sig-Geo] subsetting Tomislav Hengl wrote: In GIS terms, getting a raster from one grid topology to (any) other grid topology

Re: [R-sig-Geo] subsetting

2008-10-27 Thread Dylan Beaudette
To: Hengl, T. Cc: 'Pieter Beck'; r-sig-geo@stat.math.ethz.ch Subject: Re: [R-sig-Geo] subsetting Tomislav Hengl wrote: In GIS terms, getting a raster from one grid topology to (any) other grid topology (also subgrids) is referred to 'resampling' (I do not think that this is yet implemented

Re: [R-sig-Geo] subsetting

2008-10-24 Thread Tomislav Hengl
hth, Tom Hengl http://spatial-analyst.net -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pieter Beck Sent: Thursday, October 23, 2008 9:15 PM To: r-sig-geo@stat.math.ethz.ch Subject: [R-sig-Geo] subsetting Dear all, I am a new user to the world

Re: [R-sig-Geo] subsetting

2008-10-24 Thread Tomislav Hengl
PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pieter Beck Sent: Thursday, October 23, 2008 9:15 PM To: r-sig-geo@stat.math.ethz.ch Subject: [R-sig-Geo] subsetting Dear all, I am a new user to the world of spatial applications of R and am wondering about this trivial question: What is the easiest

Re: [R-sig-Geo] subsetting

2008-10-24 Thread Edzer Pebesma
Pieter, the easiest in terms of the least mental exercise might be to form a polygon from the four points and then overlay that with the grid. This will likely be too slow and/or memory intensive. The more efficient way would be to compute the row and column index ranges from the bounding box,

Re: [R-sig-Geo] subsetting

2008-10-24 Thread Edzer Pebesma
PROTECTED] On Behalf Of Pieter Beck Sent: Thursday, October 23, 2008 9:15 PM To: r-sig-geo@stat.math.ethz.ch Subject: [R-sig-Geo] subsetting Dear all, I am a new user to the world of spatial applications of R and am wondering about this trivial question: What is the easiest way to subset

Re: [R-sig-Geo] subsetting

2008-10-24 Thread Dylan Beaudette
-analyst.net -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pieter Beck Sent: Thursday, October 23, 2008 9:15 PM To: r-sig-geo@stat.math.ethz.ch Subject: [R-sig-Geo] subsetting Dear all, I am a new user to the world of spatial applications of R and am

[R-sig-Geo] subsetting

2008-10-23 Thread Pieter Beck
Dear all, I am a new user to the world of spatial applications of R and am wondering about this trivial question: What is the easiest way to subset a SpatialGridDataFrame, based on 4 corner coordinates? The reason I ask is that I want to do an overlay of a polygon file on a large raster

Re: [R-sig-Geo] Subsetting a point process based on a grid of square owins

2008-04-16 Thread Marcelino de la Cruz
Hi, I've got this experimental function gridppp. You have to especify the required lag of the grid (i.e. the desired length of the x-side or the y-side of each cell in the grid). It gives you a list of point patterns of the required size. Example of use: data (lansing) plot(lansing) axis(1)

[R-sig-Geo] Subsetting a point process based on a grid of square owins

2008-04-15 Thread Honey Giroday
Hi, I am currently using R 2.5.1 on a linux operating system (I am connected to the linux system via remote desktop connection). I am trying to estimate nuiscance parameters for a Geyer model that will be fit to a spatial point process dataset with ~10,000 points. However, R reaches its

[R-sig-Geo] Subsetting shapefile type PolyLine

2008-02-04 Thread Rafael Duarte
Dear all, I am very new to SIG. This is probably a very simple question but I could not find an answer searching the web and the R-SIG emails archive. I have an ESRI shapefile with a coast and bathymetric lines. In the dbf file I have a column “ELEVATION” that gives this information. I import

Re: [R-sig-Geo] Subsetting SpatialPolygonsDataFrame and empty ID slots

2007-10-30 Thread Agustin Lobo
That's really helpful, thanks. For everyday use, I've made: slotspol - function(pol, sl=ID) sapply(slot(pol, polygons), function(x) slot(x, sl)) Which can be used for any slot name: slotspol(Up) slotspol(Up,area) Also, few questions: 1. I observe that pols$Site is identical to [EMAIL