public class TPKFile extends Object
Constructor and Description |
---|
TPKFile(File theFile,
Map<Long,TPKZoomLevel> zoomLevelMap)
Constructor -- used for first open of a TPK file, parses the conf.xml file and builds the
zoomLevelMap
|
TPKFile(File theFile,
Map<Long,TPKZoomLevel> zoomLevelMap,
Envelope bounds,
String imageFormat)
Constructor -- used for all subsequent opens of the TPK file (ie once the zoomLevelMap has
been created)
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Called to close the TPK file and release resources being held
|
Envelope |
getBounds()
Using the highest zoom level contained in the TPK file use the tile coverage to calculate the
geographical bounds of the map
|
long |
getClosestZoom(long zoomLevel)
Find the closest zoom level in the TPK to the given zoom level
|
String |
getImageFormat() |
long |
getMaxColumn(long zoomLevel)
Find the maximum Web Tile Map Service column number for the given zoom level
|
long |
getMaxRow(long zoomLevel)
Find the maximum Web Tile Map Service row number for the given zoom level
|
long |
getMaxZoomLevel() |
long |
getMinColumn(long zoomLevel)
Find the minimum Web Tile Map Service column number for the given zoom level
|
long |
getMinRow(long zoomLevel)
Find the minimum Web Tile Map Service row number for the given zoom level
|
long |
getMinZoomLevel() |
List<TPKTile> |
getTiles(long zoomLevel,
long top,
long bottom,
long left,
long right,
String format)
Return a list of tile objects, each with its intended location, format and raw data
|
public TPKFile(File theFile, Map<Long,TPKZoomLevel> zoomLevelMap)
theFile
- -- the TPK file in questionzoomLevelMap
- -- reference to an empty hashmap object that we will populatepublic TPKFile(File theFile, Map<Long,TPKZoomLevel> zoomLevelMap, Envelope bounds, String imageFormat)
theFile
- -- the TPK filezoomLevelMap
- -- previously constructed zoomLevelMapbounds
- -- bounds of the mapimageFormat
- -- the image format being usedpublic void close()
public long getMinZoomLevel()
public long getMaxZoomLevel()
public String getImageFormat()
public Envelope getBounds()
public long getClosestZoom(long zoomLevel)
zoomLevel
- -- zoom level to match or approximatepublic long getMinColumn(long zoomLevel)
zoomLevel
- -- zoom level in questionpublic long getMaxColumn(long zoomLevel)
zoomLevel
- -- zoom level in questionpublic long getMinRow(long zoomLevel)
zoomLevel
- -- zoom level in questionpublic long getMaxRow(long zoomLevel)
zoomLevel
- -- zoom level in questionpublic List<TPKTile> getTiles(long zoomLevel, long top, long bottom, long left, long right, String format)
zoomLevel
- -- zoom level of tiles to returntop
- -- topmost row of tiles (lattitude)bottom
- -- bottommost row of tilesleft
- -- leftmost column of tiles (longitude)right
- -- rightmost column of tilesformat
- -- format to interpret tile data (PNG, JPEG)Copyright © 1996–2022 Geotools. All rights reserved.