|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree_impl.tools.raster.TileImageTree
The program creates a pyramidal structure for a geo-referenced image and splits each level of the 'pyramid' into several tiles. The tiles will be arranged into a Quad-Tree datastructure. The description of this datastructure will be stored into a XML-document that is conform to the deegree coverage descriptor format. (see CVDescriptor.xsd). So the result of the tileing can directly be use with the deegree GridCoverage and Web Coverage Service implementations for fast access to large amounts of raster data.
----------------------------------------------------------------------
Nested Class Summary | |
class |
TileImageTree.ProgressObserver
default progress observer class. write the progress in % to the console |
Field Summary | |
private int |
count
|
private java.lang.String |
crs
|
private boolean |
geoTiff
|
private java.awt.image.BufferedImage |
image
|
private java.lang.String |
imageName
|
private TileImageTree.ProgressObserver |
progressObserver
|
private float |
quality
|
private double |
resx
|
private double |
resy
|
private int |
startIndex
|
private java.lang.String |
targetDir
|
private java.lang.String |
targetFormat
|
protected double[] |
targetResolutions
|
private double |
xmax
|
private double |
xmin
|
private double |
ymax
|
private double |
ymin
|
Constructor Summary | |
TileImageTree(java.lang.String imageSource,
java.lang.String targetDir,
java.lang.String targetFormat,
double[] targetResolutions,
int startIndex,
float quality,
java.lang.String crs)
Creates a new instance of TileImageTree |
|
TileImageTree(java.lang.String imageSource,
java.lang.String targetDir,
java.lang.String targetFormat,
double[] targetResolutions,
int startIndex,
float quality,
java.lang.String crs,
double minx,
double miny,
double maxx,
double maxy)
Creates a new instance of TileImageTree |
Method Summary | |
private void |
addGridCoverageLayer(org.w3c.dom.Node node,
java.lang.String layerID,
java.lang.String title,
java.lang.String crs,
double llminx,
double llminy,
double llmaxx,
double llmaxy,
double minx,
double miny,
double maxx,
double maxy,
double width,
int height)
adds a new grid coverage layer to a WCS |
private org.w3c.dom.Element |
addNode(double xmin,
double ymin,
double xmax,
double ymax,
java.lang.String file,
org.w3c.dom.Element parent)
adds a new Tile-node to the GVDescriptor XML-document |
void |
createTileImageTree()
starts the creation of the tiles |
private boolean |
isGeoTIFFFormat(RenderedOp rop)
description: the following TIFFKeys count as indicator if a TIFF-File carries GeoTIFF information: ModelPixelScaleTag = 33550 (SoftDesk) ModelTransformationTag = 34264 (JPL Carto Group) ModelTiepointTag = 33922 (Intergraph) GeoKeyDirectoryTag = 34735 (SPOT) GeoDoubleParamsTag = 34736 (SPOT) GeoAsciiParamsTag = 34737 (SPOT) implementation status: working |
private java.awt.image.BufferedImage |
loadImage(java.lang.String imageSource)
loads the base image |
static void |
main(java.lang.String[] args)
|
private static void |
printHelp()
|
private void |
readBBoxFromGeoTIFF(RenderedOp rop)
description: Extracts the GeoKeys of the GeoTIFF. |
private void |
readWorldFile(java.lang.String filename)
Gets the latitude and longitude coordinates (xmin, ymin, xmax and ymax) of the image. |
private java.lang.String |
saveTile(java.awt.image.BufferedImage img)
stores one image (tile) in the desired format to the desired target directory. |
void |
setProgressObserver(TileImageTree.ProgressObserver progressObserver)
sets a user defined observer for controling the progress of the tileing |
private void |
tile(java.awt.image.BufferedImage img,
double xmin,
double ymin,
double xmax,
double ymax,
int res,
org.w3c.dom.Element parent)
the method performes the creation of the tiles and the filling of the quadtree XML-document. the method will be call in a recursion for each defined level (scale). |
private static boolean |
validate(java.util.HashMap map)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.awt.image.BufferedImage image
private TileImageTree.ProgressObserver progressObserver
private java.lang.String crs
private java.lang.String imageName
private java.lang.String targetDir
private java.lang.String targetFormat
protected double[] targetResolutions
private double resx
private double resy
private double xmax
private double xmin
private double ymax
private double ymin
private float quality
private int count
private int startIndex
private boolean geoTiff
Constructor Detail |
public TileImageTree(java.lang.String imageSource, java.lang.String targetDir, java.lang.String targetFormat, double[] targetResolutions, int startIndex, float quality, java.lang.String crs) throws java.lang.Exception
public TileImageTree(java.lang.String imageSource, java.lang.String targetDir, java.lang.String targetFormat, double[] targetResolutions, int startIndex, float quality, java.lang.String crs, double minx, double miny, double maxx, double maxy) throws java.lang.Exception
Method Detail |
public void setProgressObserver(TileImageTree.ProgressObserver progressObserver)
private java.awt.image.BufferedImage loadImage(java.lang.String imageSource) throws java.lang.Exception
java.lang.Exception
private boolean isGeoTIFFFormat(RenderedOp rop)
public void createTileImageTree() throws java.lang.Exception
java.lang.Exception
private void tile(java.awt.image.BufferedImage img, double xmin, double ymin, double xmax, double ymax, int res, org.w3c.dom.Element parent) throws java.lang.Exception
java.lang.Exception
private java.lang.String saveTile(java.awt.image.BufferedImage img) throws java.lang.Exception
java.lang.Exception
private org.w3c.dom.Element addNode(double xmin, double ymin, double xmax, double ymax, java.lang.String file, org.w3c.dom.Element parent) throws java.lang.Exception
java.lang.Exception
private void readWorldFile(java.lang.String filename) throws java.lang.Exception
java.lang.Exception
private void readBBoxFromGeoTIFF(RenderedOp rop) throws java.lang.Exception
java.lang.Exception
private void addGridCoverageLayer(org.w3c.dom.Node node, java.lang.String layerID, java.lang.String title, java.lang.String crs, double llminx, double llminy, double llmaxx, double llmaxy, double minx, double miny, double maxx, double maxy, double width, int height) throws java.lang.Exception
java.lang.Exception
private static void printHelp()
private static boolean validate(java.util.HashMap map)
map
-
public static void main(java.lang.String[] args)
args
- the command line arguments
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |