You could add a header to the ascii file to give it the ESRI format which can
then be read into R using the readAsciiGrid function from the maptools package
and viewed with the image function
The file should look something like this:
ncols 4
nrows 3
xllcorner 2.0
yllcorner
Gavin
Gavin
You can convert the raster grid to a polygon grid by coercing the
SpatialGridDataFrame to a SpatialPixelsDataFrame then from that to a
SpatialPolygonsDataFrame.
You should then be able to recode the polygon data for each particular depth
class and union them using unionSpatialP
Maarten
I'm not sure about the single quotes but possibly you could add an extra
special character break (the \ ) to indicate to python that the double quotes
surrounding your field name are not the end of a string. You could try the
following code:
rpygeo.geoprocessor("select_analysis", c(
Chris
Check out the ClassInt package.
Andrew
Dr Andrew Crowe
Lancaster Environment Centre
Lancaster University
LancasterLA1 4YQ
UK
Tel: +44 (0)1524 595879
From: r-sig-geo-boun...@stat.math.ethz.ch on behalf of Chris
Sent: Wed 04/11/2009 12:41 PM
To:
Michal
All the if statements are evaluated in your code, so the value of xx is
assigned by the final if statement. This should be solved by using 'else if'
so that the code drops out of the else block when the value is assigned.
Regards
Andrew
Dr Andrew Crowe
Lancaster Environment Cent