Re: [R-sig-Geo] Writing an ASCII grid with nodata values

2009-11-21 Thread Paul Hiemstra
Hi Ned, Is it an option to switch to another GDAL format, GTiff for example? Check if this exports the NA values correctly. Not really an answer to your question, but maybe a helpful suggestion. cheers and good luck, Paul Ned Horning wrote: I am trying to export a SpatialPixelsDataFrame

[R-sig-Geo] distance in package raster

2009-11-21 Thread Agustin Lobo
Hi According to the manual page for distance in package raster The function calculates the distance to cells of a RasterLayer that are NA. wouldn't it be better letting the user select the actual value(s) to be considered as focal pixels? The package is mainly intended to process large raster

[R-sig-Geo] polygons to grid?

2009-11-21 Thread Agustin Lobo
Hi? Is it possible to perform a vector to raster conversion in R, from SpatialPolygonsDataFrame to a SpatialGrid (providing the final resolution? In particular, is it possible to do it using package raster? (I know this can be done using gdal or grass etc, but I'm trying to find an only R

Re: [R-sig-Geo] polygons to grid?

2009-11-21 Thread Barry Rowlingson
On Sat, Nov 21, 2009 at 1:20 PM, Agustin Lobo alobolis...@gmail.com wrote: Hi? Is it possible to perform a vector to raster conversion in R, from SpatialPolygonsDataFrame to a SpatialGrid (providing the final resolution? If what you want is a raster grid storing the value of some attribute

Re: [R-sig-Geo] Writing an ASCII grid with nodata values

2009-11-21 Thread Roger Bivand
On Sat, 21 Nov 2009, Paul Hiemstra wrote: Hi Ned, Is it an option to switch to another GDAL format, GTiff for example? Check if this exports the NA values correctly. Not really an answer to your question, but maybe a helpful suggestion. cheers and good luck, Paul Ned Horning wrote: I am

[R-sig-Geo] Spatially Weighted T-Test?

2009-11-21 Thread Ezra Boyd
Hi Everyone, I have a spatial dataset (US Counties with basic Census attributes and an attribute denoting whether or not the county has a flood protection levee) and I used t.test to compare the means between the groups. All of my variables show clustering and neighborhood effects. Is there a

Re: [R-sig-Geo] polygons to grid?

2009-11-21 Thread Robert J. Hijmans
Agus, Please see raster::polygonsToRaster Let 'p' be a SpatialPolygonsDF. Create an appropriate RasterLayer object, for example use the extent of the polygons and set the resolution. r - raster(extent(p)) res(r) - 1 # then: r - polygonsToRaster(p, r) # there are additional arguments to

Re: [R-sig-Geo] polygons to grid?

2009-11-21 Thread Robert J. Hijmans
Hi Agus, In this function, and in all other functions in 'raster', the values of a new RasterLayer object are written to disk if they cannot be stored in memory (they are saved in a temporary file that is erased the next time you load the package). To force writing to disk, and to a more

Re: [R-sig-Geo] Writing an ASCII grid with nodata values

2009-11-21 Thread Ned Horning
Roger, Thanks for the note. Using: options=DECIMAL_PRECISION=3, mvFlag=- did the trick. All the best, Ned Roger Bivand wrote: On Sat, 21 Nov 2009, Paul Hiemstra wrote: Hi Ned, Is it an option to switch to another GDAL format, GTiff for example? Check if this exports the NA values