Hi Luke,
Excellent. I should have consulted the GDAL reference myself ;-) many
thanks. This was exactly what I was looking for!
I can define the DECIMAL_PRECISION parameter as an advanced option when
creating the raster. This works very well.
The only issue I see here is "user friendly-ness". While this works very
well for an experienced user, we can't expect the average user or even
novices to find out these parameters by themselves by consulting the
GDAL documentation.
Thanks,
Andreas
Am 25.01.19 um 03:09 schrieb Luke Pinner:
For ASCII grids, the gdal doc[1] notes:
When writing floating-point values, the driver uses the "%.20g" format
pattern as a default. You can consult a reference manual
<http://en.wikipedia.org/wiki/Printf> for printf to have an idea of
the exact behaviour of this ;-). You can alternatively specify the
number of decimal places with the DECIMAL_PRECISION creation option.
For example, DECIMAL_PRECISION=3 will output numbers with 3 decimal
places(using %lf format). Starting with GDAL 1.11, another option is
SIGNIFICANT_DIGITS=3, which will output 3 significant digits (using %g
format).
I don't know if you can specify gdal creation options for AAIGRID
output in QGIS 3 though.
1 https://www.gdal.org/frmt_various.html
On Thu., 24 Jan. 2019, 18:59 Andreas Neumann <[email protected]
<mailto:[email protected]> wrote:
Hi,
I have two questions about saving rasters in QGIS 3.4:
1.
If I use "Right-klick layer" --> "Export" --> "Save AS" then I
can't choose the ESRI ASCII Grid format described in "Settings"
--> "Options" --> "GDAL" as "AAIGrid".
Any idea why this format is not available for exporting rasters?
2.
As an alternative I can use the "Raster" --> "Extraction" -->
"Clip raster by extent". This works fine, but I can't set the
number of decimal places after the comma.
E.g. if I export a terrain model I would like to use 2-3 places
after the decimal, not the full 8 digits, which is a false accuracy.
Any way I can set the accuracy for the export?
Thanks,
Andreas
_______________________________________________
QGIS-Developer mailing list
[email protected] <mailto:[email protected]>
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer