Package org.mapsforge.map.layer.hills
Class HillsRenderConfig
- java.lang.Object
-
- org.mapsforge.map.layer.hills.HillsRenderConfig
-
public class HillsRenderConfig extends java.lang.Object
Mutable frontend for the hillshading cache/processing inHgtCache
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 withindexOnThread()
(e.g. after a configuration change or during setup)
-
-
Constructor Summary
Constructors Constructor Description HillsRenderConfig(java.io.File demFolder, org.mapsforge.core.graphics.GraphicFactory graphicsFactory, ShadeTileSource tileSource, ShadingAlgorithm algorithm)
HillsRenderConfig(ShadeTileSource tileSource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float
getMaginuteScaleFactor()
org.mapsforge.core.graphics.HillshadingBitmap
getShadingTile(int latitudeOfSouthWestCorner, int longituedOfSouthWestCorner, double pxPerLat, double pxPerLng)
ShadeTileSource
getTileSource()
HillsRenderConfig
indexOnThread()
call after initialization, after a set of changes to the settable properties or after forceReindex to initiate background indexingvoid
setMaginuteScaleFactor(float maginuteScaleFactor)
Increase (>1) or decrease (<1) the hillshading magnitude relative to the value set in themesvoid
setTileSource(ShadeTileSource tileSource)
-
-
-
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 themesWhen designing a theme, this should be one
-
getTileSource
public ShadeTileSource getTileSource()
-
setTileSource
public void setTileSource(ShadeTileSource tileSource)
-
-