Package org.geotools.ows.wmts.map
Class WMTSCoverageReader
- Object
-
- AbstractGridCoverage2DReader
-
- WMTSCoverageReader
-
- All Implemented Interfaces:
GridCoverageReader
,GridCoverage2DReader
public class WMTSCoverageReader extends AbstractGridCoverage2DReader
A grid coverage readers backing onto a WMTS server by issuing GetTile requests- Author:
- ian, Emanuele Tajariol (etj at geo-solutions dot it)
-
-
Field Summary
Fields Modifier and Type Field Description boolean
debug
static Logger
LOGGER
The logger for the map module.-
Fields inherited from class AbstractGridCoverage2DReader
closeMe, coverageFactory, coverageName, crs, dtLayout, EPS, gzipped, highestRes, hints, inStream, inStreamSPI, numOverviews, offsets, originalEnvelope, originalGridRange, overViewResolutions, raster2Model, scales, source
-
Fields inherited from interface GridCoverage2DReader
ELEVATION_DOMAIN, ELEVATION_DOMAIN_MAXIMUM, ELEVATION_DOMAIN_MINIMUM, ELEVATION_DOMAIN_RESOLUTION, FILE_SOURCE_PROPERTY, HAS_ELEVATION_DOMAIN, HAS_TIME_DOMAIN, MULTICRS_EPSGCODES, MULTICRS_READER, PAM_DATASET, REPROJECTING_READER, SOURCE_URL_PROPERTY, TIME_DOMAIN, TIME_DOMAIN_MAXIMUM, TIME_DOMAIN_MINIMUM, TIME_DOMAIN_RESOLUTION
-
-
Constructor Summary
Constructors Constructor Description WMTSCoverageReader(WebMapTileServer server, Layer layer)
Builds a new WMS coverage reader
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CoordinateReferenceSystem
getCoordinateReferenceSystem()
Retrieves theGeneralBounds
for thisAbstractGridCoverage2DReader
.Format
getFormat()
Returns the format handled by thisGridCoverageReader
.String[]
getMetadataNames()
Returns the list of metadata keywords associated with the input source as a whole (not associated with any particular grid coverage).String
getMetadataValue(String name)
Retrieve the metadata value for a given metadata name.String
getRequestedTime()
Get the Request timeprotected BufferedImage
getTileImage(Tile tile)
GridCoverage2D
read(GeneralParameterValue[] parameters)
Read the current grid coverage from the stream.protected void
renderTile(Tile tile, Graphics2D g2d, double[] points)
protected void
renderTiles(Collection<Tile> tiles, Graphics2D g2d, ReferencedEnvelope viewportExtent, AffineTransform worldToImageTransform)
void
setRequestedTime(String requestedTime)
Set the request timevoid
updateBounds()
Updates the coverage bounds based on layer and crs-
Methods inherited from class AbstractGridCoverage2DReader
addAllSiblings, addSiblings, checkName, collectScaleOffset, createImageCoverage, createImageCoverage, createImageCoverage, createImageCoverage, decimationOnReadingControl, dispose, finalize, getCoordinateReferenceSystem, getDatasetLayout, getDatasetLayout, getDynamicParameters, getDynamicParameters, getFiles, getGridCoverageCount, getGridCoverageNames, getGroundControlPoints, getGroundControlPoints, getHighestRes, getHighestRes, getImageLayout, getImageLayout, getInfo, getInfo, getMetadataNames, getMetadataValue, getMultiLevelROIProvider, getOriginalEnvelope, getOriginalEnvelope, getOriginalGridRange, getOriginalGridRange, getOriginalGridToWorld, getOriginalGridToWorld, getOverviewGridEnvelope, getOverviewGridEnvelope, getPamDataset, getPamDataset, getReadingResolutions, getReadingResolutions, getRescaledRasterToModel, getResolution, getResolutionLevels, getResolutionLevels, getSibling, getSource, getSourceAsFile, read, setlayout, setLayout, setReadParams, setReadParams
-
-
-
-
Field Detail
-
LOGGER
public static final Logger LOGGER
The logger for the map module.
-
debug
public final boolean debug
-
-
Constructor Detail
-
WMTSCoverageReader
public WMTSCoverageReader(WebMapTileServer server, Layer layer)
Builds a new WMS coverage reader
-
-
Method Detail
-
read
public GridCoverage2D read(GeneralParameterValue[] parameters) throws IllegalArgumentException, IOException
Description copied from class:AbstractGridCoverage2DReader
Read the current grid coverage from the stream.Example:
- Specified by:
read
in interfaceGridCoverage2DReader
- Specified by:
read
in interfaceGridCoverageReader
- Specified by:
read
in classAbstractGridCoverage2DReader
- Parameters:
parameters
- Optional parameters matchingFormat.getReadParameters()
.- Returns:
- a grid coverage from the input source.
- Throws:
InvalidParameterNameException
- if a parameter inparameters
doesn't have a recognized name.InvalidParameterValueException
- if a parameter inparameters
doesn't have a valid value.ParameterNotFoundException
- if a parameter was required for the operation but was not provided in theparameters
list.IOException
- if a read operation failed for some other input/output reason, includingFileNotFoundException
if no file with the givenname
can be found, orIIOException
if an error was thrown by the underlying image library.IllegalArgumentException
-
renderTiles
protected void renderTiles(Collection<Tile> tiles, Graphics2D g2d, ReferencedEnvelope viewportExtent, AffineTransform worldToImageTransform)
-
renderTile
protected void renderTile(Tile tile, Graphics2D g2d, double[] points)
-
getTileImage
protected BufferedImage getTileImage(Tile tile)
-
getCoordinateReferenceSystem
public CoordinateReferenceSystem getCoordinateReferenceSystem()
Description copied from class:AbstractGridCoverage2DReader
Retrieves theGeneralBounds
for thisAbstractGridCoverage2DReader
.- Specified by:
getCoordinateReferenceSystem
in interfaceGridCoverage2DReader
- Overrides:
getCoordinateReferenceSystem
in classAbstractGridCoverage2DReader
- Returns:
- the
GeneralBounds
for thisAbstractGridCoverage2DReader
.
-
getFormat
public Format getFormat()
Description copied from interface:GridCoverageReader
Returns the format handled by thisGridCoverageReader
.
-
updateBounds
public void updateBounds()
Updates the coverage bounds based on layer and crs
-
getMetadataNames
public String[] getMetadataNames()
Description copied from interface:GridCoverageReader
Returns the list of metadata keywords associated with the input source as a whole (not associated with any particular grid coverage). If no metadata is available, the array will be empty.- Specified by:
getMetadataNames
in interfaceGridCoverageReader
- Overrides:
getMetadataNames
in classAbstractGridCoverage2DReader
- Returns:
- The list of metadata keywords for the input source.
- See Also:
GridCoverageReader.getMetadataNames()
-
getMetadataValue
public String getMetadataValue(String name)
Description copied from interface:GridCoverageReader
Retrieve the metadata value for a given metadata name.- Specified by:
getMetadataValue
in interfaceGridCoverageReader
- Overrides:
getMetadataValue
in classAbstractGridCoverage2DReader
- Parameters:
name
- Metadata keyword for which to retrieve metadata.- Returns:
- The metadata value for the given metadata name. Should be one of the name returned by
GridCoverageReader.getMetadataNames()
. - See Also:
GridCoverageReader.getMetadataValue(java.lang.String)
-
getRequestedTime
public String getRequestedTime()
Get the Request time
-
setRequestedTime
public void setRequestedTime(String requestedTime)
Set the request time
-
-