Does it have to be that ascii format? There are much better options for regular grids, such as GeoTIFF - but it depends on your target of course. Note that some software supports different dx/dy sizes, namely GDAL and Golden Surfer for this format:
http://www.gdal.org/frmt_various.html#AAIGrid If it does need to be ESRI ASCII, you could write it out with square cells and then reset the cell sizes in the target (if possible). Is the requirement for square cells with the ESRI version of this format, or with the software you want to use next? As a last resort you could resample the grid using R's indexing/seq functions, or with spsample in package sp, or warp it with an external tool like gdalwarp. Cheers, Mike. On Tue, Feb 2, 2010 at 9:32 AM, Narayani Barve <narayani...@gmail.com> wrote: > Hi All, > > I want to convert netCDF files to ESRI ASCII grid. I used the package ncdf > to read the file and get the required variable in the matrix format. Now I > want to write this matrix into ESRI ASCII grid. Looking at the extends of > the data, and the row and column dimensions, I know that the CELLSIZE is not > square. > > Is there any way, I can convert this data into square ASCII Grid (ESRI) > format. > > Thanks, > Narayani > > [[alternative HTML version deleted]] > > _______________________________________________ > R-sig-Geo mailing list > R-sig-Geo@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/r-sig-geo > _______________________________________________ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo