logo separator

[mkgmap-dev] DEM-file generation from geo-tiff sources ?

From franco_bez franco.bez at web.de on Sun Jan 7 12:25:05 GMT 2018

Frank Stinner-2 wrote
> Hi Franco,
> 
> i have seen an silly error in my area. Europa is a little bit greater ;)
> Just i have "$lattop = 70". The split create 3608 tif's with 4,5 GB in 85
> min. gdal4hgt create 1171 zipped hgt's with 5,8 GB in 3 h :((
> And then i rebuild the tif's from the hgt's in 20 min. That are 4 GB.

OK

> Perhaps you have an to old gdal-version without lzw-compression? Or
> perhaps

It's the current version of gdal

> -co \"COMPRESS=LZW\" -co \"TILED=YES\" -co \"PREDICTOR=2\"
> 
> should be better
> 
> -co COMPRESS=LZW -co TILED=YES -co PREDICTOR=2

That did the trick :-) 

Thanks a lot.

now this is the new perl script for Ubuntu
---

use strict;

my $lonleft = -24;
my $lonright = 50;
my $latbottom = 27;
my $lattop = 70;

my $srcdir = "..";

my $delta = 1 / 3600 / 2;     # half pixel

print "#!/bin/sh\n";
print "GDAL_TRANSLATE_OPT='-multi -wo NUM_THREADS=ALL_CPUS -t_srs EPSG:4326
-r near -ot Int16 -dstnodata -32768 -of GTiff -co COMPRESS=LZW -co TILED=YES
-co PREDICTOR=2 -ts 3601 3601'\n";
for (my $lat = $latbottom; $lat != $lattop; $lat++) {
    for (my $lon = $lonleft; $lon != $lonright; $lon++) {
       printf "gdalwarp \$GDAL_TRANSLATE_OPT -te %.7f %.7f %.7f %.7f
$srcdir/all.vrt %s%02d%s%03d.tif\n",
              $lon - $delta,
              $lat - $delta,
              $lon + 1 + $delta,
              $lat + 1 + $delta,
              'N',
              $lat >= 0 ? $lat : -$lat,
              $lon >= 0 ? 'E' : 'W',
              $lon >= 0 ? $lon : -$lon;
    }
}

---

Ciao,
  Franco



--
Sent from: http://gis.19327.n8.nabble.com/Mkgmap-Development-f5324443.html


More information about the mkgmap-dev mailing list