Adaptive hill shading by Sublimis · Pull Request #1592 · mapsforge/mapsforge

@Sublimis

* Adaptive hill shading (AdaptiveClasyHillShading): Hill shading can now be rendered efficiently at all zoom levels (screenshots below).
    - Adaptive hill shading algorithm autonomously decides min/max zoom levels by default (others continue to work as before)
    - It will dynamically decide on the resolution and quality of the output depending on the display parameters, to maximize efficiency
    - Min/max zoom levels can be enforced via code
* Hill shading color feature. Color for the hill shading can now be set via render theme, or overriden by the code.
* New <hillshading> render theme element attribute: "color".
* Deprecated the "always" attribute of the <hillshading> render theme element, it's obsolete.
* Significantly improved HgtCache: It will now constraint based on memory usage and also prevent unconstrained cache hammering and resulting excessive memory usage and possible OOM exceptions in extreme situations.
* HgtFileInfo class was made a standalone class.
* AbsShadingAlgorithmDefaults name was simplified (renamed) to AShadingAlgorithm.
* Hill shading bitmaps are now synchronized where needed (prevents various artifacts, at least on Android).
* Fix (AWT): Hill shading does not use AwtLuminanceShadingComposite any more, it's obsolete. It was used in the past to reduce the effect of the "neutral hills" gray overlay, which is not present any more. This change also improves performance of the hill shading on AWT, and restores symmetry with Android.
* Multithreaded indexing of DEM files