
Hi, there is a new version (8.11.2017), https://github.com/FSofTlpz/Garmin-DEM-Build/blob/master/BuildDEMFile/bin/Bu.... This version should be assume less memory. Reading HGT's should be faster. It seems, --lastcolstd isn't more necessary (?). By the way, the programm runs also with linux mint 18.2 and mono. Main options: -d, --dem=arg name of DEM-file, (e.g. 70210001.DEM) --hgtpath=arg directory for HGT's (zipped or not) --tre=arg name of TRE-file (e.g. 70210001.TRE) -o, --dlon=arg distance between DEM-Point (multiple usage for more zoomlevels) --usedummydata=arg use 'without-value' (0x8000), if one or more HGT's not present --lastcolstd=arg last subtile column has ever a width of 64 (need a little bit more memory on disk) -O, --overwrite=arg overwrite existing destination files or not -f, --foot=arg DEM data in foot or meter Frank --- Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. https://www.avast.com/antivirus

Hi Frank I'm having problems with your latest BuidDEM.exe. No problem with the one you did last week. I grant you its fast but it is not parsing the tiles. ie I dont get the periods .... I get this: Pixelgröße 0.0004° x 0.0004° encodiere 300 Subtiles Der gewünschte Bereich überschreitet den Bereich der eing elesenen HGT-Werte. C:\ProgramData\Garmin\Maps\November_9.gmap\Product1>(E:\BuildDEMFile5.exe -d 123 45697\12345697.DEM --hgtpath=E:\Dem\All_UK_HGT_Data\ --tre=12345697\12345697.TRE --dlon=0.00027761 --dlon=0.0004000 --overwrite=true ) BuildDEMFile, Version vom 8.11.2017, Copyright © FSofT 2017 Daten aus der TRE-Datei '12345697\12345697.TRE' gelesen HGT-Daten lesen ... Höhen für -3° .. -2° / 50° .. 51° eingelesen, Werte -8 .. 277 Einlesezeit 0.0s 2 Zoomlevel Kachelanzahl 14 x 15 (rechte Spalte 69 breit, untere Zeile 5 hoch) Rand links -3.95919799804688°, oben 50.9024047851563°, 0.250046253204346° breit, 0.250003337860107° hoch Pixelgröße 0.00027761° x 0.00027761° Kachelanzahl 9 x 10 (rechte Spalte 114 breit, untere Zeile 50 hoch) Rand links -3.95919799804688°, oben 50.9024047851563°, 0.250046253204346° breit, 0.250003337860107° hoch Pixelgröße 0.0004° x 0.0004° encodiere 300 Subtiles Der gewünschte Bereich überschreitet den Bereich der eing elesenen HGT-Werte. C:\ProgramData\Garmin\Maps\November_9.gmap\Product1>(E:\BuildDEMFile5.exe -d 123 45698\12345698.DEM --hgtpath=E:\Dem\All_UK_HGT_Data\ --tre=12345698\12345698.TRE --dlon=0.00027761 --dlon=0.0004000 --overwrite=true ) BuildDEMFile, Version vom 8.11.2017, Copyright © FSofT 2017 Daten aus der TRE-Datei '12345698\12345698.TRE' gelesen HGT-Daten lesen ... Höhen für -4° .. -3° / 50° .. 51° eingelesen, Werte -34 .. 602 Höhen für -3° .. -2° / 50° .. 51° eingelesen, Werte -8 .. 277 Einlesezeit 0.0s 2 Zoomlevel Kachelanzahl 14 x 7 (rechte Spalte 69 breit, untere Zeile 11 hoch) Rand links -4.20917987823486°, oben 50.4024410247803°, 0.250024795532227° breit, 0.109648704528809° hoch Pixelgröße 0.00027761° x 0.00027761° Kachelanzahl 9 x 5 (rechte Spalte 114 breit, untere Zeile 19 hoch) Rand links -4.20917987823486°, oben 50.4024410247803°, 0.250024795532227° breit, 0.109648704528809° hoch Pixelgröße 0.0004° x 0.0004° encodiere 143 Subtiles Der gewünschte Bereich überschreitet den Bereich der eing elesenen HGT-Werte.

Hi Frank, i have succesfull added DEM files and then all subfiles joined with gmtool to <12345678>.img. After that i will create a new tdb using cmd. It gives me the following : D:\Kartensoftware\mkgmap\BuildDEM>gmtool --overwrite --input \\64BIT\64bitDaten\OSMKarten\Kan ren\3???????.img --output \\64BIT\64bitDaten\OSMKarten\Kanaren. --mapsource=pid:1;fid:1918;cp 1252;ov:TopoKana.img;tdb:TopoKana.tdb;notyp;nomdx;nomdr;noinst --version=1710 --mapfamilyname "Test" --mapseriesname="TopoKanDEM" --description="DEMTest" --routable=1 --highestroutable=24 --maxbits4overview=18 --hasdem=1 --hasprofile=1 --copyright=*I* GMTool, Version vom 1.11.2017, Copyright © FSofT 2016 Clipper Library 6.4.0 von Angus Johnson (http://sourceforge.net/projects/polyclipping) GarminCore-DLL, Version vom 27.10.2017, Copyright © FSofT 2011 Anzahl der Eingabedateien: 2 untersuche Datei \\64BIT\64bitDaten\OSMKarten\Kanaren\30007501.IMG ... untersuche Datei \\64BIT\64bitDaten\OSMKarten\Kanaren\30007502.IMG ... werte Kachel '30007501' aus ... Fehler: Der angegebene Schlüssel war nicht im Wörterbuch ange eben. Wie kann ich den Fehler vermeiden oder was mache ich falsch ? Wenn ich als input direkt die TRE-subfiles nehme, kommt ..Die Mapnummer kann nicht ermittelt werden.... Alternativ habe ich gmt benutzt um eine neue TDB +preview zu schreiben. Aber damit stürzt Mapsource ab. Gar keine neue TDB zu schreiben geht nur mit Mapsource. Die selbe Karte im Basecamp bewirkt, dass BC nach Adresssuche total einfriert und nur im Taskmanager zu killen ist. thomas Am 08.11.2017 um 20:02 schrieb Frank Stinner:
Hi,
there is a new version (8.11.2017), https://github.com/FSofTlpz/Garmin-DEM-Build/blob/master/BuildDEMFile/bin/Bu.... This version should be assume less memory. Reading HGT's should be faster. It seems, --lastcolstd isn't more necessary (?). By the way, the programm runs also with linux mint 18.2 and mono.
Main options:
-d, --dem=arg name of DEM-file, (e.g. 70210001.DEM) --hgtpath=arg directory for HGT's (zipped or not) --tre=arg name of TRE-file (e.g. 70210001.TRE) -o, --dlon=arg distance between DEM-Point (multiple usage for more zoomlevels) --usedummydata=arg use 'without-value' (0x8000), if one or more HGT's not present --lastcolstd=arg last subtile column has ever a width of 64 (need a little bit more memory on disk) -O, --overwrite=arg overwrite existing destination files or not -f, --foot=arg DEM data in foot or meter
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

Hi Thomas, it's a stupid error message. If i can get the IMG, then can i run it in the debugger und looking what's going wrong. Perhaps is an error in IMG file? Try please also gmtool -i 30007501.IMG -I 1 > info_img.txt A second possibility is, you use gmt and then create with gmtool -i gmt.TDB -I 3 > info_tdb.txt a info file for this TDB. It should looking like this: TDBVersion: 407 CodePage: 1252 (0x000004E4) Family-ID: 7026 (0x1B72) Product-ID: 1 (0x0001) ProductVersion: 100 (0x0064) FamilyName: OSM, Austria SeriesName: Austria, aio, 5.6.2017 Routingfähig: 1 (0x01) größter Routing-Typ: 24 (0x18) mit Contourlinien: 1 (0x01) DEM: 1 (0x01) niedrigster MapLevel:18 (0x12) Beschreibung: AUT Unknown1: 0 (0x00) Unknown2: 1 (0x01) Unknown3: 1 (0x01) Unknown4: 1 (0x01) Unknown5: 0 (0x00) .... Unknown29: 10000 (0x00002710) Copyright: [CopyrightInformation, ProductInformationAndPrinting] created by gmtool Overviewmap: Kartenummer: 70260000 (0x04301520) übergeordnet: 0 (0x00000000) Beschreibung: AUT, (70260000) Anzeigebereich: Lon 9,492188°..17,182617°, Lat 46,318359°..49,042969° Detailkarten: 53 Kartenummer: 70260001 (0x04301521) übergeordnet: 70260000 (0x04301520) Beschreibung: DE-Muenchen, (70260001) Anzeigebereich: Lon 9,492188°..13,315430°, Lat 47,900391°..49,042969° Dateien: 70260001.TRE (110159 Byte), 70260001.LBL (165626 Byte), 70260001.RGN (7789597 Byte), 70260001.NET (702298 Byte), 70260001.NOD (1082548 Byte), 70260001.DEM (24354388 Byte) HasCopyright: 1 (0x01) Unknown1: 0 (0x0000) Unknown2: 195 (0xC3) Unknown3: 0 (0x00) Unknown4: 255 (0xFF) .... Look, if the overviewmap have the right ID and the other maps this ID as "übergeordnet". Look, that all the subfiles are listed. If the properties like Family-ID are false, you change it with gmtool. The unknown bytes are really unknown. The values above are used in mkgmap. BTw, there is a newer prog version, but i don't belief, they going better. Frank --- Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. https://www.avast.com/antivirus

Hi Frank, thanks for great program! I have added DEM to my map and it works well. I have noticed 2 glitches: When using option --mt program sometime stops working. No crash, no use of CPU, it looks stalled. No problem without --mt. Sometimes program crashes, when DEM raster is too small. Note "Kachelanzahl 0 x 1" BuildDEMFile, Version vom 9.11.2017b, Copyright c FSofT 2017 ... 5 Zoomlevel Kachelanzahl 17 x 19 (rechte Spalte 113 breit, untere Zeile 49 hoch) Rand links 22,9999208450317°, oben 53,0000638961792°, 0,946884155273438° breit, 1,00009918212891° hoch Pixelgröße 0,000833333333333333° x 0,000833333333333333° Kachelanzahl 8 x 10 (rechte Spalte 121 breit, untere Zeile 25 hoch) Rand links 22,9999208450317°, oben 53,0000638961792°, 0,946884155273438° breit, 1,00009918212891° hoch Pixelgröße 0,0016666666666667° x 0,0016666666666667° Kachelanzahl 4 x 5 (rechte Spalte 93 breit, untere Zeile 45 hoch) Rand links 22,9999208450317°, oben 53,0000638961792°, 0,946884155273438° breit, 1,00009918212891° hoch Pixelgröße 0,0033333333333333° x 0,0033333333333333° Kachelanzahl 2 x 3 (rechte Spalte 79 breit, untere Zeile 23 hoch) Rand links 22,9999208450317°, oben 53,0000638961792°, 0,946884155273438° breit, 1,00009918212891° hoch Pixelgröße 0,0066666666666667° x 0,0066666666666667° Kachelanzahl 0 x 1 (rechte Spalte Indeks wykraczał poza granice tablicy. Reported error means: array index out of range. I have a suggestion. We use HGT files, where size of DEM pixel is 1/1200 or 1/3600 degree. Writing it as a decimal is tedious. Could you accept other form of defining pixel size, something like: --xlon=3600;2;4;8;32 where 3600 is number of pixels for 1 degree and 2,4,8,32 are dividers for that value for successive layers. It would be much cleaner and accurate than my current option, which is: --dlon=2.777777777777778e-4;5.555555555555556e-4;0.0011111111111111;0.0022222222222222;0.0088888888888889 -- Best regards, Andrzej

Hi Andrzej, please try the last version. The version info is the same, but false! It's from 10.11.2017 I get with builddemfile -O --dem=x.dem --hgtpath=%OSM_DATA%\srtm_zip -l 22.9999208450317 -t 53.0000638961792 -w 0.946884155273438 -h 1.00009918212891 --dlon=0.0016666666666667 --dlon=0.0066666666666667 --dlon=0.013333333333333 BuildDEMFile, Version vom 9.11.2017b, Copyright © FSofT 2017 HGT-Daten lesen ... Höhen für 23° .. 24° / 52° .. 53° eingelesen, Werte 97 .. 215 Höhen für 23° .. 24° / 51° .. 52° eingelesen, Werte 130 .. 293 Höhen für 22° .. 23° / 53° .. 54° eingelesen, Werte 69 .. 230 Höhen für 22° .. 23° / 52° .. 53° eingelesen, Werte 77 .. 219 Höhen für 23° .. 24° / 53° .. 54° eingelesen, Werte 74 .. 246 Höhen für 22° .. 23° / 51° .. 52° eingelesen, Werte 112 .. 304 Einlesezeit 0,3s 3 Zoomlevel Kachelanzahl 8 x 10 (rechte Spalte 121 breit, untere Zeile 25 hoch) Rand links 22,9999208450317°, oben 53,0000638961792°, 0,946884155273438° breit, 1,00009918212891° hoch Pixelgröße 0,0016666666666667° x 0,0016666666666667° Kachelanzahl 2 x 3 (rechte Spalte 79 breit, untere Zeile 23 hoch) Rand links 22,9999208450317°, oben 53,0000638961792°, 0,946884155273438° breit, 1,00009918212891° hoch Pixelgröße 0,0066666666666667° x 0,0066666666666667° Kachelanzahl 1 x 2 (rechte Spalte 72 breit, untere Zeile 12 hoch) Rand links 22,9999208450317°, oben 53,0000638961792°, 0,946884155273438° breit, 1,00009918212891° hoch Pixelgröße 0,013333333333333° x 0,013333333333333° encodiere 88 Subtiles ..... 88 Kacheln encodiert Laufzeit 0,8s The option --mt is not allright. Have you see the runtime? It's the same or a little more then without the option. I haven't still found the cause ot this. I belief, your --xlon idea is not useful. Yes, the point-distance in the hgt's is 1/1200 or 1/3600 degree. But the corner left-top of the TRE can have any value and not only in this grid. Therefore we have normaly to interpolate the value for this corner and for all other points. That means, we nearly ever use interpolated values. Of course, interpolation make the values not better! If you interested you find interpolation algorithm in the function InterpolatedHeight() in HGTReader.cs. It is not necessary, to double the values. Try out and use distances, that looks good for you. Frank --- Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. https://www.avast.com/antivirus

Hi Frank, I think I was already using the latest version. Please try this one: BuildDEMFile.exe -d 09940185.DEM --hgtpath=C:\hgt\ --usedummydata -l 18.1 -t 50.0 -w 0.90 -h 0.60 --dlon=8.333333333333333e-4;0.0016666666666667;0.0033333333333333;0.0066666666666667;0.0266666666666664
Therefore we have normaly to interpolate the value for this corner and for all other points.
I was thinking about accuracy of pixel size, not position. And about an easy way to set these sizes. Just a thought after copying all these numbers form calculator ;) -- Best regards, Andrzej
participants (4)
-
Andrzej Popowski
-
Frank Stinner
-
osm@pinns
-
Thomas Morgenstern