Class HillsRenderConfig


  • public class HillsRenderConfig
    extends java.lang.Object
    Mutable frontend for the hillshading cache/processing in HgtCache

    All changes are lazily applied when a tile is requested with getShadingTile(int, int, double, double), which includes a full reindex of the .hgt files. Eager indexing on a dedicated thread can be triggered with indexOnThread() (e.g. after a configuration change or during setup)

    • Constructor Detail

      • HillsRenderConfig

        public HillsRenderConfig​(ShadeTileSource tileSource)
      • HillsRenderConfig

        public HillsRenderConfig​(java.io.File demFolder,
                                 org.mapsforge.core.graphics.GraphicFactory graphicsFactory,
                                 ShadeTileSource tileSource,
                                 ShadingAlgorithm algorithm)
    • Method Detail

      • indexOnThread

        public HillsRenderConfig indexOnThread()
        call after initialization, after a set of changes to the settable properties or after forceReindex to initiate background indexing
      • getShadingTile

        public org.mapsforge.core.graphics.HillshadingBitmap getShadingTile​(int latitudeOfSouthWestCorner,
                                                                            int longituedOfSouthWestCorner,
                                                                            double pxPerLat,
                                                                            double pxPerLng)
                                                                     throws java.util.concurrent.ExecutionException,
                                                                            java.lang.InterruptedException
        Parameters:
        latitudeOfSouthWestCorner - tile ID latitude (southwest corner, as customary in .hgt)
        longituedOfSouthWestCorner - tile ID longitude (southwest corner, as customary in .hgt)
        pxPerLat - pixels per degree of latitude (to determine padding quality requirements)
        pxPerLng - pixels per degree of longitude (to determine padding quality requirements)
        Returns:
        Throws:
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException
      • getMaginuteScaleFactor

        public float getMaginuteScaleFactor()
      • setMaginuteScaleFactor

        public void setMaginuteScaleFactor​(float maginuteScaleFactor)
        Increase (>1) or decrease (<1) the hillshading magnitude relative to the value set in themes

        When designing a theme, this should be one

      • setTileSource

        public void setTileSource​(ShadeTileSource tileSource)