logo separator

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

From franco_bez franco.bez at web.de on Wed Jan 3 10:42:50 GMT 2018

Frank Stinner wrote
> At the moment we have to translate the tiffs from EPSG:3035 to EPSG:4326, 
> then the segmentation in 1°x1° tiffs an at last the conversion to hgt 
> files. This should not be a very great problem with gdal-tools or so, but 
> it is additional work.

Hi Frank,

thanks for the hint 

It was a long process (some hours), but in the end I succeeded in converting
4 of the giant copernicus tiff-tiles to 627 small (1°x1°) hgt files.

1. I joined the 4 tiles to one monster-file using gdal_merge
2. I converted the coordiante system with "gdalwarp -s_srs EPSG:3035 -t_srs
EPSG:4326"
3. with a small shell script the file got cut to 1°x1° tiles using
gdal_translate
   i.e.  "gdal_translate -strict -q -eco -projwin 10 48 11 47 "  for the
N47E010 tile
4. with another script the tiles were converted from tif to hgt format also
using gdal_translate
   "gdal_translate -strict -q -eco -of SRTMHGT -outsize 3601 3601 "

the scripts I used are only "quick 'n' dirty" hacks.

a few notes:
There were a few problems to work around
the coordinate system in use by copernicus does not follow the
latitude/longitude degrees
Corner Coordinates of the eu_dem_v11_E30N30.TIF:
Upper Left  ( 3000000.000, 4000000.000) ( 12°15'58.58"W, 57°13'49.19"N)
Lower Left  ( 3000000.000, 3000000.000) (  8° 7'39.52"W, 48°38'23.47"N)
Upper Right ( 4000000.000, 4000000.000) (  4°25'17.11"E, 58°59'15.42"N)
Lower Right ( 4000000.000, 3000000.000) (  5°31' 4.07"E, 50° 1'26.83"N)

in  EPSG:3035 coordinate it's a perfect square, but in  EPSG:4326 it's a
wedge.
I decided to join the copernicus tiles before converting the coordinate
system in order not to run into any problems at the original tile borders.

the hgt files must start precisely at the degree borders, so the tiles need
to be cut at the precise "projwin" coordinates

last the hgt tiles must be 3601x3601 pixel

Ciao,
  Franco




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


More information about the mkgmap-dev mailing list