public class TPKZoomLevelV2 extends Object implements TPKZoomLevel
TPK is a ZIP archive
In V2 the bundle index is a incorporated into the same file as the bundle data. The index entries are each 8-bytes long and have both the tile data length and tile data offset.
Also note that the index is stored in row-major order INSTEAD of column-major order!
Constructor and Description |
---|
TPKZoomLevelV2(ZipFile theTPK,
Map<String,ZipEntry> zipEntryMap,
List<String> bundleNames,
long zoomLevel) |
Modifier and Type | Method and Description |
---|---|
long |
getMaxColumn() |
long |
getMaxRow() |
long |
getMinColumn() |
long |
getMinRow() |
List<TPKTile> |
getTiles(long top,
long bottom,
long left,
long right,
String format)
Read the tile data for the given coverage and return a list of tile objects to the caller.
|
long |
getZoomLevel() |
void |
releaseResources()
When done with TPK file call this method for each Zoom Level to free up held resources and
remove object references that would prevent garbage collection
|
void |
setTPKandEntryMap(ZipFile theTPK,
Map<String,ZipEntry> zipEntryMap)
On subsequent uses of a TPK file we must use this method to set current references!!
|
public void setTPKandEntryMap(ZipFile theTPK, Map<String,ZipEntry> zipEntryMap)
setTPKandEntryMap
in interface TPKZoomLevel
theTPK
- -- reference to the TPK ZipFile objectzipEntryMap
- -- reference to the ZipEntry mapping objectpublic List<TPKTile> getTiles(long top, long bottom, long left, long right, String format)
getTiles
in interface TPKZoomLevel
top
- -- topmost row of coveragebottom
- -- bottommost row of coverageleft
- -- leftmost column of coverageright
- -- rightmost column of coverageformat
- -- format of tile data (PNG, JPEG)public void releaseResources()
releaseResources
in interface TPKZoomLevel
public long getZoomLevel()
getZoomLevel
in interface TPKZoomLevel
public long getMinRow()
getMinRow
in interface TPKZoomLevel
public long getMaxRow()
getMaxRow
in interface TPKZoomLevel
public long getMinColumn()
getMinColumn
in interface TPKZoomLevel
public long getMaxColumn()
getMaxColumn
in interface TPKZoomLevel
Copyright © 1996–2023 Geotools. All rights reserved.