On Thu, 24 Jan 2019 at 23:05, Andreas Neumann <a.neum...@carto.net> wrote:
> My data is originally coming from an ESRI ascii grid. It had been many > hundred tiles of ascii grids which I merged into a single big GEOTIFF file. > The original data had up to 3 digits after the decimal point for the terrain > height (mm accuracy) per cell. After import to the Geotiff the data has now > many more (useless) digits after the comma, because the number of the digits > in the geotiff is now defined by the float32 data type I chose. When I export > that data back to ESRI ascii grid I get 15! digits after the decimal point. I > would like to round it back to 2 digits after the decimal point (cm accuracy). I might be missing something, but it sounds like this change in precision has happened at the conversion to geotiff stage, not the "clip raster by extent" stage? Does converting the grids to a single vrt, and then using GDAL translate to convert the combined vrt directly to an ascii grid help? Nyall > > In addition, the header in the resulting asciigrid has now many useless > digits. It looks like this: > > ncols 233 > nrows 189 > xllcorner 2681471.893245012965 > yllcorner 1224297.020738559077 > dx 0.999927877238 > dy 1.000035130719 > NODATA_value 0 > > Note that the resolution of the data is 1m. But in the export it comes out as > dx 0.999927877238 - dy 1.000035130719 > > I wonder if I could force the resolution back to 1.0 (the original > resolution). > > So it is an issue of rounding/accuracy. > > Thanks again, > > Andreas > > > > > _______________________________________________ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer