Dear Edzer
Thanks for suggestion. I am now able to select individual or set of polygons.
Thanks Again
Rahul Raj
Indian Institute of Remote Sensing, India.
___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ge
On Sat, 12 Feb 2011, Sean O'Riordain wrote:
Hi Rahul,
First look at
str(polygon, max.level=2)
to understand how a shapefile is represented in R, then have a look at
str(polygon@data)
One of the major strengths of the raster package is that it encapsulates
much of the lower-level detail tha
On 02/12/2011 02:05 PM, Sean O'Riordain wrote:
> Hi Rahul,
>
> First look at
> str(polygon, max.level=2)
> to understand how a shapefile is represented in R, then have a look at
> str(polygon@data)
> which is a dataframe - you can add a new column to this dataframe like...
> polygon@data$n
Hi Rahul,
First look at
str(polygon, max.level=2)
to understand how a shapefile is represented in R, then have a look at
str(polygon@data)
which is a dataframe - you can add a new column to this dataframe like...
polygon@data$newcolumn <- 1:nrow(polygon@data)
i.e you can treat this dataframe
Dear all,
I am using the command "extract(raster, polygon)".
> I want to run this command in loop to extract the raster cells values by
polygon number in each iteration.
> I also want to attach one attribute column to shape file and write the
shape file with added attribute.
Please help me how can