Package org.geotools.tpk
Class TPKReader
- Object
-
- AbstractGridCoverage2DReader
-
- TPKReader
-
- All Implemented Interfaces:
GridCoverageReader,GridCoverage2DReader
public class TPKReader extends AbstractGridCoverage2DReader
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTPKReader.ImageFormats
-
Field Summary
Fields Modifier and Type Field Description protected ReferencedEnvelopeboundsprotected static intDEFAULT_TILE_SIZEprotected StringimageFormatprotected FilesourceFileprotected static ReferencedEnvelopeWORLD_ENVELOPEprotected static intZOOM_LEVEL_BASEprotected Map<Long,TPKZoomLevel>zoomLevelMap-
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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description FormatgetFormat()Returns the format handled by thisGridCoverageReader.protected BufferedImagegetStartImage(int width, int height)protected BufferedImagegetStartImage(int imageType, int width, int height)protected BufferedImagegetStartImage(BufferedImage copyFrom, int width, int height)GridCoverage2Dread(GeneralParameterValue[] parameters)Read the current grid coverage from the stream.protected static BufferedImagereadImage(byte[] data, String format)protected voidsetBackground(BufferedImage image, Color bgColor)-
Methods inherited from class AbstractGridCoverage2DReader
addAllSiblings, addSiblings, checkName, collectScaleOffset, createImageCoverage, createImageCoverage, createImageCoverage, createImageCoverage, decimationOnReadingControl, dispose, finalize, getCoordinateReferenceSystem, getCoordinateReferenceSystem, getDatasetLayout, getDatasetLayout, getDynamicParameters, getDynamicParameters, getFiles, getGridCoverageCount, getGridCoverageNames, getGroundControlPoints, getGroundControlPoints, getHighestRes, getHighestRes, getImageLayout, getImageLayout, getInfo, getInfo, getMetadataNames, getMetadataNames, getMetadataValue, 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
-
WORLD_ENVELOPE
protected static final ReferencedEnvelope WORLD_ENVELOPE
-
DEFAULT_TILE_SIZE
protected static final int DEFAULT_TILE_SIZE
- See Also:
- Constant Field Values
-
ZOOM_LEVEL_BASE
protected static final int ZOOM_LEVEL_BASE
- See Also:
- Constant Field Values
-
bounds
protected ReferencedEnvelope bounds
-
imageFormat
protected String imageFormat
-
sourceFile
protected File sourceFile
-
zoomLevelMap
protected Map<Long,TPKZoomLevel> zoomLevelMap
-
-
Method Detail
-
getFormat
public Format getFormat()
Description copied from interface:GridCoverageReaderReturns the format handled by thisGridCoverageReader.
-
read
public GridCoverage2D read(GeneralParameterValue[] parameters) throws IllegalArgumentException
Description copied from class:AbstractGridCoverage2DReaderRead the current grid coverage from the stream.Example:
- Specified by:
readin interfaceGridCoverage2DReader- Specified by:
readin interfaceGridCoverageReader- Specified by:
readin classAbstractGridCoverage2DReader- Parameters:
parameters- Optional parameters matchingFormat.getReadParameters().- Returns:
- a grid coverage from the input source.
- Throws:
InvalidParameterNameException- if a parameter inparametersdoesn't have a recognized name.InvalidParameterValueException- if a parameter inparametersdoesn't have a valid value.ParameterNotFoundException- if a parameter was required for the operation but was not provided in theparameterslist.IllegalArgumentException
-
readImage
protected static BufferedImage readImage(byte[] data, String format) throws IOException
- Throws:
IOException
-
getStartImage
protected BufferedImage getStartImage(BufferedImage copyFrom, int width, int height)
-
getStartImage
protected BufferedImage getStartImage(int imageType, int width, int height)
-
getStartImage
protected BufferedImage getStartImage(int width, int height)
-
setBackground
protected void setBackground(BufferedImage image, Color bgColor)
-
-