<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div> </div>
<div class="signature">
<div>Hey there,</div>
<div>I’ve got a problem concerning exporting a raster*-Object as nc-File:<br/>
When exporting rasterLayers or rasterBricks as nc-Files with writeRaster from the raster-Package, easting and northing in the resulting nc-File are switched, which results in a rotated plot. I can correct this afterwards, but it should be possible to be correct right away?!</div>
<div> </div>
<div>Example code for a rasterLayer:<br/>
tmp <- raster(readGDAL(‘example.asc’,p4s="+init=epsg:31467"))<br/>
writeRaster(tmp, filename=’export.nc’, format="CDF", overwrite=TRUE)<br/>
nc <- open.ncdf("export.nc")<br/>
x <- get.var.ncdf(nc,”easting”)<br/>
y <- get.var.ncdf(nc,”northing”)</div>
<div> </div>
<div>R version 2.15.3 (2013-03-01)<br/>
Platform: x86_64-w64-mingw32/x64 (64-bit)<br/>
ncdf_1.6.6 raster_2.1-16 rgdal_0.8-5 sp_1.0-6</div>
<div><br/>
I hope someone can give me a hint! Thanks in advance!<br/>
Philipp</div>
<div> </div>
</div></div></body></html>