<HTML><BODY><div><div>Hi all,</div><div> </div><div>Thanks a lot for the new build r4907 !!!</div><div>It works well.</div></div><div> </div><div><div>But there are problems with the accuracy of the values.</div><div>Often integers are converted to fractions.</div><div>Perhaps something with rounding of intermediate fractional values.</div><div> </div><div>(.MP)->(.IMG) in meters:</div><div>22 -> 21.9 (-0.1)</div><div>22.5->22.6 (+0.1)</div><div>23->22.9 (-0.1)</div><div><strong>23.5->23.5 (=0)</strong></div><div>24->24.1 (+0.1)</div><div>24.5->24.4 (-0.1)</div><div><strong>25->25 (=0)</strong></div><div>25.5->25.6 (+0.1)</div><div>26->25.9 (-0.1)</div><div><strong>26.5->26.5 (=0)</strong></div><div>27->27.1 (+0.1)</div><div>...</div><div>Can accuracy be improved?</div></div><div> </div><div><div>PS: Values of CONTOUR types 0x10900...0x10905 are still not converted according to the ELEVATION=M parameter. :(</div><div>PPS: It is worth noting that cGPSmapper has the same problems…</div><div>--<br>Vadim</div></div><blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;"><div><br>Суббота, 4 марта 2023, 11:23 +03:00 от Gerd Petermann <gpetermann_muenchen@hotmail.com>:<br> <div id=""><div class="js-helper js-readmsg-msg"><div><div id="style_16779181841986375734_BODY">Hi Vadim,<br><br>the code in mkgmap seems to expect int values when elevation is given in m. No idea why, the code is from 2008 and wasn't changed since:<br><br> private void fixElevation() {<br> if (elevUnits == 'm') {<br> String h = polyline.getName();<br> try {<br> // Convert to feet.<br> int n = Integer.parseInt(h);<br> n *= METERS_TO_FEET;<br> polyline.setName(String.valueOf(n));<br><br> } catch (NumberFormatException e) {<br> // OK it wasn't a number, leave it alone<br> }<br> }<br> }<br><br>I can change that to use double precision but you probably need more changes to support the special types. Maybe you can modify PolishMapDataSource.java<br>and provide a patch?<br><br>Gerd<br><br><br>________________________________________<br>Von: mkgmap-dev <<a href="/compose?To=mkgmap%2ddev%2dbounces@lists.mkgmap.org.uk">mkgmap-dev-bounces@lists.mkgmap.org.uk</a>> im Auftrag von Vadim Karpov <<a href="/compose?To=bombur@mail.ru">bombur@mail.ru</a>><br>Gesendet: Freitag, 3. März 2023 09:46<br>An: Development list for mkgmap<br>Betreff: Re: [mkgmap-dev] The "Elevation=M" in the header of the polish .MP files does not work<br><br>Hi all!<br><br>Thanks for the new build (r4906) !<br>But the problem is only partially solved.<br><br>Integer values (22 or 12) are converted normally.<br>But fractional ones (for example: 25.5 or 26.25) are still perceived by the compiler as feet. :(<br><br>All values of subtypes 0-5 of marine type 09 (0x10900 … 0x10905) are interpreted exclusively as feet...<br><br>PS: I can't place an example .MP file in this mailing list. I will send it personally.<br>Четверг, 2 марта 2023, 18:01 +03:00 от Gerd Petermann <<a href="/compose?To=gpetermann_muenchen@hotmail.com">gpetermann_muenchen@hotmail.com</a>>:<br><br>Hi all,<br><br>OK, I see no problems to change this method in GType.java:<br> public static boolean isContourLine(MapLine line) {<br> return line.getType() >= 0x20 && line.getType() <= 0x22 && !(line instanceof MapShape);<br> }<br><br>All I have to do is to change 0x22 to 0x25, right?<br><br>Gerd<br><br>________________________________________<br>Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk<<a href="/compose?To=%2fcompose%3fTo%3dmkgmap%252ddev%252dbounces@lists.mkgmap.org.uk">/compose?To=mkgmap%2ddev%2dbounces@lists.mkgmap.org.uk</a>>> im Auftrag von Vadim Karpov <bombur@mail.ru<<a href="/compose?To=%2fcompose%3fTo%3dbombur@mail.ru">/compose?To=bombur@mail.ru</a>>><br>Gesendet: Donnerstag, 2. März 2023 14:38<br>An: mkgmap-dev@lists.mkgmap.org.uk<<a href="/compose?To=%2fcompose%3fTo%3dmkgmap%252ddev@lists.mkgmap.org.uk">/compose?To=mkgmap%2ddev@lists.mkgmap.org.uk</a>><br>Betreff: Re: [mkgmap-dev] The "Elevation=M" in the header of the polish .MP files does not work<br><br>Hi<br><br>Yes.<br><br>Types 0x23.0x24.0x25 are used to create bathymetric maps.<br><br>Information from the MPCTypes.txt file (TypViewer application):<br><br>0x02000=Contour Lines/MINOR_CONTOUR/Minor land-based contour line/Non NT<br>0x02100=Contour Lines/INT_CONTOUR/Intermediate contour (should be used for about every 5th contour line)/Non NT<br>0x02200=Contour Lines/MAJOR_CONTOUR/Major contour (should be used for about every 10th contour line)/Non NT<br><br>0x02300=Contour Lines/MINOR_BATHY_CONTOUR/Minor bathymetric, or depth, contour/Non NT<br>0x02400=Contour Lines/INT_BATHY_CONTOUR/Intermediate bathymetric, or depth, contour (should be used for about every 5th contour line)/Non NT<br>0x02500=Contour Lines/MAJOR_BATHY_CONTOUR/Major bathymetric, or depth, contour (should be used for about every 10th contour line)/Non NT<br><br>Четверг, 2 марта 2023, 12:01 +03:00 от Ticker Berkin <rwb-mkgmap@jagit.co.uk<<a href="/compose?To=%2fcompose%3fTo%3drwb%252dmkgmap@jagit.co.uk">/compose?To=rwb%2dmkgmap@jagit.co.uk</a>>>:<br><br>Hi<br><br>My understanding of the default Garmin usage is that<br> 0x20..0x22 are land/height contours (Minor to Major)<br> 0x23..0x25 are sea/depth " "<br><br>Ticker<br><br>On Thu, 2023-03-02 at 08:52 +0000, Gerd Petermann wrote:<div class="mail-quote-collapse">> Hi Vadim,<br>><br>> I see code in mkgmap to handle the statement with Elevation=m or<br>> Elevation=M, but it is only used for the line types 0x20 .. 0x22.<br>> Do you have a good reason to use line type 0x25 instead?<br>><br>> Gerd<br>><br>><br>> ________________________________________<br>> Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk</compose?To=mkgmap%2ddev%2dbounces@lists.mkgmap.org.uk<<a href="/compose?To=%2fcompose%3fTo%3d%252fcompose%253fTo%253dmkgmap%25252ddev%25252dbounces@lists.mkgmap.org.uk">/compose?To=%2fcompose%3fTo%3dmkgmap%252ddev%252dbounces@lists.mkgmap.org.uk</a>>>> im Auftrag<br>> von Vadim Karpov <bombur@mail.ru</compose?To=bombur@mail.ru<<a href="/compose?To=%2fcompose%3fTo%3d%252fcompose%253fTo%253dbombur@mail.ru">/compose?To=%2fcompose%3fTo%3dbombur@mail.ru</a>>>><br>> Gesendet: Mittwoch, 1. März 2023 13:00<br>> An: mkgmap-dev@lists.mkgmap.org.uk</compose?To=mkgmap%2ddev@lists.mkgmap.org.uk<<a href="/compose?To=%2fcompose%3fTo%3d%252fcompose%253fTo%253dmkgmap%25252ddev@lists.mkgmap.org.uk">/compose?To=%2fcompose%3fTo%3dmkgmap%252ddev@lists.mkgmap.org.uk</a>>><br>> Betreff: [mkgmap-dev] The "Elevation=M" in the header of the polish<br>> .MP files does not work<br>><br>> Good afternoon !<br>><br>> I am using the latest version of MkGMap and trying to create a depth<br>> chart with isolines (types 0x24, 0x25).<br>><br>> The problem is that the compiler interprets the depth specified in<br>> Meters as in Feet.<br>> The result is independent of the presence or value of the<br>> "Elevation=M" parameter.<br>><br>> And I didn't find an alternative command line option. :(<br>><br>> So how can I tell the compiler to treat all numerical depth and<br>> height values in an .MP file as meters and not feet?<br>><br>> Thanks for the advice.<br>><br>> PS: cGpsMapper works fine with "Elevation=M" of course.<br>> PPS: Example of polylyne defs:<br>><br>> [POLYLINE]<br>> Type=0x02500<br>> Label=21<br>> EndLevel=3<br>> Data0=(47.139263517000003,-122.560520313), ...<br>> [END]<br>><br>> [POLYLINE]<br>> Type=0x02500<br>> Label=12<br>> EndLevel=3<br>> Data0=(47.127846400000003,-122.562501059), ...<br>> [END]<br>><br>> --<br>> Vadim Karpov<br>> _______________________________________________<br>> mkgmap-dev mailing list<br>> mkgmap-dev@lists.mkgmap.org.uk</compose?To=mkgmap%2ddev@lists.mkgmap.org.uk<<a href="/compose?To=%2fcompose%3fTo%3d%252fcompose%253fTo%253dmkgmap%25252ddev@lists.mkgmap.org.uk">/compose?To=%2fcompose%3fTo%3dmkgmap%252ddev@lists.mkgmap.org.uk</a>>><br>> <a href="https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev" target="_blank">https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a></div><br><br>--<br>Vadim Karpov<br>Отправлено из Почты Mail.ru<https://trk.mail.ru/c/zzm979><br><br>--<br>Vadim Karpov</div></div></div></div></div></blockquote><div><br> </div><div> </div></BODY></HTML>