mantlik / osm2garmin

Convert OpenStreetMap data to Garmin-compatible format.
http://osm2garmin.mantlik.org/
GNU General Public License v2.0
9 stars 1 forks source link

Contours are generated in areas of low relief – and are not wanted #130

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hello

I am making maps where I only want minor contours every 100 meters and major 
every 500m for the complete map. The problem is that in areas of low relief 
(flat areas under 300m? 200m?) (ex. shore areas) the program will generate 
minor contours every 10 meters regardless of program settings. In areas with an 
elevation above these levels contours are generated according to program 
settings. This is easiest to see in the Galapagos Islands (Isla Genovesa and 
Rabida) near Lat/Long N00 19.5 / W89 57.5, S00 25.25 / W90 42 but happens in 
many other areas.

In addition to not providing me the control that over map generation that I 
want, the maps appear “inconsistent” with some areas displaying 10 meters 
contours and adjacent areas not. Bad maps!

This may be related to the contour generation changes introduced on 2012-02-28 
where: “Completely rewritten contours generation procedure. Contours density 
is more sensitive to the terrain shape in given area. Smaller contours interval 
is set in flat areas.” ( http://osm.blog.mantlik.cz/news/)

Additional Notes -

Changing program options has some effect, but not the control that I need
My settings are contour interval 100/100/500, elevation difference100/5000. 
Version 1.2.267 and Java 1.7.055 and Linux 3.11.0-12

If contour generation in flat areas is “hard coded” I need the option to 
disable this function either via a check box (preferred) or passing the program 
an argument (particularly if this is a quick change). This is an important 
issue for me, unfortunately, maybe only to me. :)

I marked this as an enhancement, but...

Thanks, pitney

Original issue reported on code.google.com by mappit...@gmail.com on 20 Jul 2014 at 3:04

GoogleCodeExporter commented 9 years ago
Hi Pitney,

yes, generation of additional contours when the overall elevation difference in 
a block leads to generating no contours according to the program settings is 
hard-coded and can't be switched off neither by a checkbox nor by a parameter.

Unfortunatelly, currently I am too busy to be able to change it in near future. 
Nevertheless, the source code is freely available and you are encouraged to 
make the change yourself if you can. I will happily merge your code improvement 
into the main source tree.

Original comment by mantl...@gmail.com on 20 Jul 2014 at 3:22

GoogleCodeExporter commented 9 years ago
Frantisek-

Thank you for your reply. I would like to try adjusting the source code to not 
create contours in areas of low relief. 

I have looked at the source code and have a few questions:

which file/module contains the contour generation code?
where does the contour code start if this is a large file?
which language is the code written in?
will I need to re-compile the code after making changes?

Finally, is there a release available that does not include the updated contour 
code? 

I remain interested in updating the Users Gude when version 1.3 is released.

Thanks, pitney

Original comment by mappit...@gmail.com on 21 Sep 2014 at 6:18

GoogleCodeExporter commented 9 years ago
Pitney,

currently there is a high priority problem related to the fact that the Torrent 
generation service (a Hungarian server) is shutting down. In order to keep the 
software useable I need to return back to the HTTP download. When this urgent 
problem will be solved, I would like to finalize the 0.2 version to the final 
release.

Concerning your questions, the software is written in Java, but I do not 
remember further details you are asking about the module for contour 
generation. At this moment you have to make it up yourself. You can track back 
the Subversion repository to search for contour generation updates. Possibly, 
Issues history could be helpful as well.

Original comment by mantl...@gmail.com on 21 Sep 2014 at 6:30