Hi Franco,
i have little bit "played" with copernicus-files.
I have build a win-command-file with this perl-file:
use strict;
my $lonleft = -24;
my $lonright = 50;
my $latbottom = 27;
my $lattop = 64;
my $srcdir = "../org";
my $delta = 1 / 3600 / 2; # half pixel
print "set 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;
}
}
Yes, i was very lazy with the huge area. That are 2740 1°x1° tiles. But my computer is very diligent ;) . Have in mind the $delta. Hgt's have not
exact 1° width/height. It's 1 pixel more, that means a half pixel on each side.
I have tested different interpolation methods. I believe "near" is the best
(and fastest) method.
My computer created in 65 min all the tif's. I'm sure, that is strong depend on
the hardware.
Surprisingly the new tif's have only round about 4 GB.
Then i create with
gdalbuildvrt all.vrt *.tif
gdal4hgt --raster=all.vrt --dstpath=..\hgt -O
the zipped hgt's. That is very easy but very slow (160 min). By the way, gdal4hgt create only hgt's with min. 1 non-nodata value. The resulting zipped
1001 hgt's need 5,2 GB!
You wrote: "gdal_translate -strict -q -eco -of SRTMHGT -outsize 3601 3601 "
should basically do the same job ...
The format SRTMHGT was new for me, but i think, you are right. I have not
tested the speed.
Frank
---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus
_______________________________________________
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev