public abstract class TileCacheInformation
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected MapBounds |
bounds
the map bounds.
|
protected double |
dpi
the DPI to render at.
|
protected java.awt.Rectangle |
paintArea
the area to paint.
|
| Constructor and Description |
|---|
TileCacheInformation(MapBounds bounds,
java.awt.Rectangle paintArea,
double dpi,
AbstractTiledLayerParams params)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.awt.image.BufferedImage |
createBufferedImage(int imageWidth,
int imageHeight)
Create a buffered image with the correct image bands etc...
|
protected java.lang.String |
createCommonUrl()
Create a URL that is common to all tiles for this layer.
|
abstract java.lang.Double |
getLayerDpi()
Get the DPI of the layer's images.
|
org.locationtech.jts.geom.Coordinate |
getMinGeoCoordinate(org.geotools.geometry.jts.ReferencedEnvelope envelope,
org.locationtech.jts.geom.Coordinate geoTileSize)
Calculate the minx and miny coordinate of the tile that is the minx and miny tile.
|
java.awt.image.BufferedImage |
getMissingTileImage()
Return the image to draw in place of a tile that is missing.
|
abstract double |
getResolution()
Get the resolution that the layer uses for its calculations.
|
protected abstract org.geotools.geometry.jts.ReferencedEnvelope |
getTileCacheBounds()
Return the full bounds of the tileCache.
|
abstract org.springframework.http.client.ClientHttpRequest |
getTileRequest(MfClientHttpRequestFactory httpRequestFactory,
java.lang.String commonUrl,
org.geotools.geometry.jts.ReferencedEnvelope tileBounds,
java.awt.Dimension tileSizeOnScreen,
int column,
int row)
Create the http request for loading the image at the indicated area and the indicated size.
|
abstract java.awt.Dimension |
getTileSize()
Obtain the image tile size of the tiles that will be loaded from the server.
|
protected final MapBounds bounds
protected final java.awt.Rectangle paintArea
protected final double dpi
public TileCacheInformation(MapBounds bounds, java.awt.Rectangle paintArea, double dpi, AbstractTiledLayerParams params)
bounds - the map boundspaintArea - the area to paintdpi - the DPI to render atparams - the params with the data for creating the layer.@Nonnull public abstract org.springframework.http.client.ClientHttpRequest getTileRequest(MfClientHttpRequestFactory httpRequestFactory, java.lang.String commonUrl, org.geotools.geometry.jts.ReferencedEnvelope tileBounds, java.awt.Dimension tileSizeOnScreen, int column, int row) throws java.lang.Exception
httpRequestFactory - the factory to use for making http requestscommonUrl - the uri that is common to all tiles. See createCommonUrl()tileBounds - the bounds of the image in world coordinatestileSizeOnScreen - the size of the tile on the screen or on the image.column - the column index of the tile from the origin of the tile cache.row - the row index of the tile from the origin of the tile cache.java.lang.Exceptionpublic abstract double getResolution()
public abstract java.lang.Double getLayerDpi()
public abstract java.awt.Dimension getTileSize()
@Nonnull protected abstract org.geotools.geometry.jts.ReferencedEnvelope getTileCacheBounds()
@Nonnull
public org.locationtech.jts.geom.Coordinate getMinGeoCoordinate(org.geotools.geometry.jts.ReferencedEnvelope envelope,
org.locationtech.jts.geom.Coordinate geoTileSize)
envelope - the area that will be displayed.geoTileSize - the size of each tile in world space.@Nonnull
public java.awt.image.BufferedImage createBufferedImage(int imageWidth,
int imageHeight)
imageWidth - width of the image to createimageHeight - height of the image to create.protected java.lang.String createCommonUrl()
throws java.net.URISyntaxException,
java.io.UnsupportedEncodingException
java.net.URISyntaxExceptionjava.io.UnsupportedEncodingException@Nullable public java.awt.image.BufferedImage getMissingTileImage()