Package com.massifmaps.datasources
Class BitmapOverlayRasterTileDataSource
java.lang.Object
com.massifmaps.datasources.TileDataSource
com.massifmaps.datasources.BitmapOverlayRasterTileDataSource
Tile data source that uses given bitmap with two, three or four control points define a raster overlay.
Note: if two points are given, conformal transformation is calculated. If three points are given, affine transformation is calculated. In case of four points, perspective transformation is used.
Note: if two points are given, conformal transformation is calculated. If three points are given, affine transformation is calculated. In case of four points, perspective transformation is used.
-
Constructor Summary
ConstructorsConstructorDescriptionBitmapOverlayRasterTileDataSource(int minZoom, int maxZoom, Bitmap bitmap, Projection projection, MapPosVector mapPoses, ScreenPosVector bitmapPoses) Constructs a new bitmap overlay data source. -
Method Summary
Modifier and TypeMethodDescriptionReturns the extent of the tiles in this data source.
The bounds are in coordinate system of the projection of the data source.Loads the specified tile.
Note: the tile coordinate system used here is vertically flipped relative to layer tile coordinate system.Methods inherited from class com.massifmaps.datasources.TileDataSource
buildTagValues, containsMetaDataKey, getContainerMetaData, getMaxOverzoomLevel, getMaxZoom, getMaxZoomWithOverzoom, getMetaData, getMetaDataElement, getMinZoom, getProjection, isMaxOverzoomLevelSet, notifyTilesChanged, setMaxOverzoomLevel, setMetaData, setMetaDataElement
-
Constructor Details
-
BitmapOverlayRasterTileDataSource
public BitmapOverlayRasterTileDataSource(int minZoom, int maxZoom, Bitmap bitmap, Projection projection, MapPosVector mapPoses, ScreenPosVector bitmapPoses) Constructs a new bitmap overlay data source.- Parameters:
minZoom- The minimum zoom for generated tiles.maxZoom- The maximum zoom for generated tiles.bitmap- The bitmap to use as an overlay.projection- The projection definining coordinate system of the control points.mapPoses- The geographical control points. The list must contain either 2, 3 or 4 points.bitmapPoses- The pixel coordinates in the bitmap corresponding to geographical control points. The number of coordinates must be equal to the number of control points in mapPoses list.- Throws:
IllegalArgumentException- If the transformation can not be calculated.
-
-
Method Details
-
getDataExtent
Description copied from class:TileDataSourceReturns the extent of the tiles in this data source.
The bounds are in coordinate system of the projection of the data source.- Overrides:
getDataExtentin classTileDataSource- Returns:
- The extent of the data source.
-
loadTile
Description copied from class:TileDataSourceLoads the specified tile.
Note: the tile coordinate system used here is vertically flipped relative to layer tile coordinate system.- Overrides:
loadTilein classTileDataSource- Parameters:
mapTile- The tile to load.- Returns:
- The tile data. If the tile is not available, null may be returned.
-