Re: [R-sig-Geo] Beginners question: From text-raster to grid / map

2010-09-17 Thread Crowe, Andrew
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

Re: [R-sig-Geo] Convert SpatialGridDataFrame to polygons...?

2010-07-15 Thread Crowe, Andrew
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

Re: [R-sig-Geo] RPyGeo Query -- probably easy

2009-12-18 Thread Crowe, Andrew
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(

Re: [R-sig-Geo] Jencks' natural breaks

2009-11-04 Thread Crowe, Andrew
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:

Re: [R-sig-Geo] several 'if' conditions with 'apply'

2008-06-05 Thread Crowe, Andrew
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