Re: [gdal-dev] Extra Decimal places added to ASCII gdal_translate mosaic

2014-03-12 Thread Jonathan Moules
Hi David, Here's a crazy idea could you perhaps use mm and then output to an integer raster? No problem representing 50597mm. I like you thinking! But on reflection suspect that would confound a few too many of our users. It's certainly a nice lateral-thinking solution to bear in mind for

Re: [gdal-dev] Extra Decimal places added to ASCII gdal_translate mosaic

2014-03-12 Thread David J. Bakeman
On 03/12/2014 06:58 AM, Jonathan Moules wrote: Hi David, Here's a crazy idea could you perhaps use mm and then output to an integer raster? No problem representing

Re: [gdal-dev] Extra Decimal places added to ASCII gdal_translate mosaic

2014-03-11 Thread Jonathan Moules
TIFF stores floating point values as IEEE754 floats. Talking about significant figures doesn't make much sense. You could test using Float64 with the hope that 50.597 can be exactly represented as a Float64. Otherwise you'll have to do the rounding when reading back from TIFF. Hi Even,

Re: [gdal-dev] Extra Decimal places added to ASCII gdal_translate mosaic

2014-03-11 Thread Even Rouault
Hi Even, Thanks for the information. I don't pretend to understand the fine details of floats, but it does seem counter intuitive that a simple 2 or 3 decimal places can't be accurately represented. Yes this is really counter intuitive. I've just tested with the Python console that 50.597

Re: [gdal-dev] Extra Decimal places added to ASCII gdal_translate mosaic

2014-03-11 Thread Jonathan Moules
Hi Even, Thanks for the information. I tried the Float64 but the values are identical (16 significant figures) even though the filesize is predictably larger. I guess I'll have to make do, but it does introduce the problem of False Precision. Very few formats take into account

Re: [gdal-dev] Extra Decimal places added to ASCII gdal_translate mosaic

2014-03-11 Thread David J. Bakeman
On 03/11/2014 02:06 AM, Jonathan Moules wrote: TIFF stores floating point values as IEEE754 floats. Talking about significant figures doesn't

Re: [gdal-dev] Extra Decimal places added to ASCII gdal_translate mosaic

2014-03-10 Thread Jonathan Moules
Hi List, Bringing back an old thread but with a slight change. I'm now trying to get GDAL to mosaic and export from the ASCII files to a GeoTIFF. But the GeoTIFF writer in GDAL is doing the exact same thing as the ASCII writer was - it's taking *50.597* (source value) and converting it into

Re: [gdal-dev] Extra Decimal places added to ASCII gdal_translate mosaic

2014-03-10 Thread Etienne Tourigny
Have you tried using a 36bit (float) instead of 64bit (double) output? double is usually the default output type and has more significant digits (~16) than your source, so it's representation is ok in double format see [1] for an explanation on floating-point precision the following argument

Re: [gdal-dev] Extra Decimal places added to ASCII gdal_translate mosaic

2014-03-10 Thread Jonathan Moules
Hi Etienne, I was looking for something like that but the http://www.gdal.org/frmt_gtiff.html page didn't list it explicitly. That said, looking at the gdalinfo now (a little late) I see that it's already defaulting to Float32. I also tested with the -ot Float32 arguement, but there was no

Re: [gdal-dev] Extra Decimal places added to ASCII gdal_translate mosaic

2014-03-10 Thread Even Rouault
Le lundi 10 mars 2014 18:55:36, Jonathan Moules a écrit : Hi Etienne, I was looking for something like that but the http://www.gdal.org/frmt_gtiff.html page didn't list it explicitly. That said, looking at the gdalinfo now (a little late) I see that it's already defaulting to Float32. I

Re: [gdal-dev] Extra Decimal places added to ASCII gdal_translate mosaic

2014-03-10 Thread Kyle Shannon
Hi, I restored DECIMAL_PRECISION and added SIGNIFICANT_DIGIT and also reformatted the NODATA_value, although that may or may not be correct as per Even's remarks. See: http://trac.osgeo.org/gdal/ticket/3732 for a review. On Mon, Mar 10, 2014 at 1:21 PM, Even Rouault

Re: [gdal-dev] Extra Decimal places added to ASCII gdal_translate mosaic

2014-01-25 Thread Even Rouault
Le vendredi 24 janvier 2014 23:03:24, Hermann Peifer a écrit : On 2014-01-24 17:22, Norman Vine wrote: hmm this seems to be related to this fairly recent change http://trac.osgeo.org/gdal/ticket/3732 http://osgeo-org.1560.x6.nabble.com/gdal-dev-Change-of-DECIMAL-PRECISION-

[gdal-dev] Extra Decimal places added to ASCII gdal_translate mosaic

2014-01-24 Thread Jonathan Moules
Hi List, I'm trying to mosaic some ASCII grid tiles into a single large ASCII file (which can then easily be handled). I'm using this process: REM Create list of files dir /b /s *.asc asc_list.txt REM Turn into VRT gdalbuildvrt -srcnodata - -vrtnodata 0 -a_srs EPSG:27700

Re: [gdal-dev] Extra Decimal places added to ASCII gdal_translate mosaic

2014-01-24 Thread Norman Vine
try gdal_translate -of AAIGrid -co DECIMAL_PRECISION=3 abc.vrt abc.asc see http://www.gdal.org/frmt_various.html HTH Norman On Jan 24, 2014, at 10:01 AM, Jonathan Moules jonathanmou...@warwickshire.gov.uk wrote: Hi List, I'm trying to mosaic some ASCII grid tiles into a single large ASCII

Re: [gdal-dev] Extra Decimal places added to ASCII gdal_translate mosaic

2014-01-24 Thread Jonathan Moules
Thanks Norman. I'd already seen that page but failed to read it! However, having tested it, it's not functioning as the manual says. As best I can tell, DECIMAL_PRECISION=3 should give me 3 decimal places. But what it instead does it give me 3 significant figures. So 98.354 has become 98.3. This

Re: [gdal-dev] Extra Decimal places added to ASCII gdal_translate mosaic

2014-01-24 Thread Norman Vine
hmm this seems to be related to this fairly recent change http://trac.osgeo.org/gdal/ticket/3732 http://osgeo-org.1560.x6.nabble.com/gdal-dev-Change-of-DECIMAL-PRECISION-in-AAIGrid-td5075524.html don't know much more Norman On Jan 24, 2014, at 11:12 AM, Jonathan Moules

Re: [gdal-dev] Extra Decimal places added to ASCII gdal_translate mosaic

2014-01-24 Thread Hermann Peifer
On 2014-01-24 17:22, Norman Vine wrote: hmm this seems to be related to this fairly recent change http://trac.osgeo.org/gdal/ticket/3732 http://osgeo-org.1560.x6.nabble.com/gdal-dev-Change-of-DECIMAL-PRECISION-in-AAIGrid-td5075524.html I am just repeating what I wrote in the above-mentioned