Package org.geotools.tpk
Class TPKZoomLevelV1
- Object
-
- TPKZoomLevelV1
-
- All Implemented Interfaces:
TPKZoomLevel
public class TPKZoomLevelV1 extends Object implements TPKZoomLevel
TPKZoomLevel interface implementation for ESRI Compact Cache V1 filesTPK is a ZIP archive
In V1 the bundle index is a separate file from the bundle data and index entries are each 5-bytes long. The index is stored in column-major order.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetMaxColumn()longgetMaxRow()longgetMinColumn()longgetMinRow()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.longgetZoomLevel()voidreleaseResources()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 collectionvoidsetTPKandEntryMap(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:
setTPKandEntryMapin 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 (both for the index and the data files)- Specified by:
getTilesin 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:
releaseResourcesin interfaceTPKZoomLevel
-
getZoomLevel
public long getZoomLevel()
- Specified by:
getZoomLevelin interfaceTPKZoomLevel
-
getMinRow
public long getMinRow()
- Specified by:
getMinRowin interfaceTPKZoomLevel
-
getMaxRow
public long getMaxRow()
- Specified by:
getMaxRowin interfaceTPKZoomLevel
-
getMinColumn
public long getMinColumn()
- Specified by:
getMinColumnin interfaceTPKZoomLevel
-
getMaxColumn
public long getMaxColumn()
- Specified by:
getMaxColumnin interfaceTPKZoomLevel
-
-