[R-sig-Geo] writeRaster does not preserve names when writing to NetCDF

2014-08-11 Thread Mark Payne
Hi, I have a problem with writeRaster when writing a brick to NetCDF - the names of the layers are not preserved. Here is a minimum example to demonstrate the point: #Create an arbitrary brick and write it out b - brick(system.file(external/rlogo.grd, package=raster)) fname - file.path(

Re: [R-sig-Geo] Using 'raster' package functions with rasterEngine

2014-08-11 Thread Jonathan Greenberg
Hi Dave: If you can provide some code examples that would be easier, but I can give you a couple of hints. First, use debugmode=TRUE when you are testing your function -- this will save you a lot of headaches down the line. R will enter its debugmode inside of the rasterEngine function so you

[R-sig-Geo] using lapply() with Spatial Objects

2014-08-11 Thread Remi Genevest
I have a list of coordinates that each corresponds to the center of polygon. My purpose is to create the polygons using lapply() and plot them on the same device. And actually I have 2 questions : - How can I create some polygons using lapply() with a SpatialPointsDataFrame ? - How can I

Re: [R-sig-Geo] writeRaster does not preserve names when writing to NetCDF

2014-08-11 Thread Michael Sumner
Hi, I don't think that NetCDF has the capacity to store these names in a natural way. Internally your brick is stored as a NetCDF variable, in this case a 3d array. To do this it would need to define a 'dimension and include a lookup map to the names. A NetCDF dimension variable must be populated