Package org.geotools.tpk
Class TPKZoomLevelV2
- Object
-
- TPKZoomLevelV2
-
- All Implemented Interfaces:
TPKZoomLevel
public class TPKZoomLevelV2 extends Object implements TPKZoomLevel
TPKZoomLevel interface implementation for ESRI Compact Cache V2 filesTPK 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!
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 collectionvoid
setTPKandEntryMap(ZipFile theTPK, Map<String,ZipEntry> zipEntryMap)
On subsequent uses of a TPK file we must use this method to set current references!!
-
-
-
Method Detail
-
setTPKandEntryMap
public void setTPKandEntryMap(ZipFile theTPK, Map<String,ZipEntry> zipEntryMap)
On subsequent uses of a TPK file we must use this method to set current references!!- Specified by:
setTPKandEntryMap
in interfaceTPKZoomLevel
- Parameters:
theTPK
- -- reference to the TPK ZipFile objectzipEntryMap
- -- reference to the ZipEntry mapping object
-
getTiles
public 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. Note the read order we used is optimized for this version of the content cache (ie we try to always read forward as much as possible!!)- Specified by:
getTiles
in interfaceTPKZoomLevel
- Parameters:
top
- -- topmost row of coveragebottom
- -- bottommost row of coverageleft
- -- leftmost column of coverageright
- -- rightmost column of coverageformat
- -- format of tile data (PNG, JPEG)- Returns:
- -- list of TPKTile objects
-
releaseResources
public 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- Specified by:
releaseResources
in interfaceTPKZoomLevel
-
getZoomLevel
public long getZoomLevel()
- Specified by:
getZoomLevel
in interfaceTPKZoomLevel
-
getMinRow
public long getMinRow()
- Specified by:
getMinRow
in interfaceTPKZoomLevel
-
getMaxRow
public long getMaxRow()
- Specified by:
getMaxRow
in interfaceTPKZoomLevel
-
getMinColumn
public long getMinColumn()
- Specified by:
getMinColumn
in interfaceTPKZoomLevel
-
getMaxColumn
public long getMaxColumn()
- Specified by:
getMaxColumn
in interfaceTPKZoomLevel
-
-