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

Jonathan Moules jonathanmoules at warwickshire.gov.uk
Fri Jan 24 07:01:43 PST 2014


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 "-9999" -vrtnodata "0" -a_srs "EPSG:27700"
> -input_file_list "asc_list.txt" abc.vrt
>


> REM actual mosaicing
> gdal_translate -of AAIGrid abc.vrt abc.asc


The input files are like:

> ncols         500
> nrows         500
> xllcorner     432000.000
> yllcorner     243000.000
> cellsize      2
> nodata_value  -9999.0
> 98.354 98.449 98.658 98.874 99.038 99.096


But the outputs are like:

fncols        500
> nrows        1000
> xllcorner    432000.000000000000
> yllcorner    242000.000000000000
> cellsize     2.000000000000
> NODATA_value  0
>  98.353996276855469 98.448997497558594 98.657997131347656
> 98.874000549316406


Suddenly everything has a dozen extra decimal places. Not only does this
induce the False Precision problem (we don't have heights to the
femtometer!), it also massively increases the filesize.

How can I get this to not happen?

Thanks,
Jonathan

-- 
This transmission is intended for the named addressee(s) only and may 
contain sensitive or protectively marked material up to RESTRICTED and 
should be handled accordingly. Unless you are the named addressee (or 
authorised to receive it for the addressee) you may not copy or use it, or 
disclose it to anyone else. If you have received this transmission in error 
please notify the sender immediately. All email traffic sent to or from us, 
including without limitation all GCSX traffic, may be subject to recording 
and/or monitoring in accordance with relevant legislation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20140124/372b2811/attachment.html>


More information about the gdal-dev mailing list