|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree_impl.tools.raster.TileImageTree2
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 | |
private static class |
TileImageTree2.DFileFilter
|
class |
TileImageTree2.ProgressObserver
default progress observer class. write the progress in % to the console |
private static class |
TileImageTree2.UniteGvDesc
|
Field Summary | |
private int |
count
|
private java.lang.String |
crs
|
private java.util.HashMap |
featColl
|
private boolean |
geoTiff
|
private java.awt.image.BufferedImage |
image
|
private java.lang.String |
imageName
|
private TileImageTree2.ProgressObserver |
progressObserver
|
private float |
quality
|
private double |
resx
|
private double |
resy
|
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 | |
TileImageTree2(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 |
Method Summary | |
private org.w3c.dom.Element |
addDirectory(int tileWidth,
int tileHeight,
java.lang.String dirName,
double widthCRS,
double heightCRS,
org.w3c.dom.Element parent)
adds a new Directory-node to the GVDescriptor XML-document |
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 |
void |
createTileImageTree()
starts the creation of the tiles |
private void |
createWorldFile(java.lang.String dir,
double xmin_,
double ymin_,
double xmax_,
double ymax_,
double tilex,
double tiley)
|
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.lang.String dir,
double x,
double y,
java.awt.image.BufferedImage img)
stores one image (tile) in the desired format to the desired target directory. |
void |
setProgressObserver(TileImageTree2.ProgressObserver progressObserver)
sets a user defined observer for controling the progress of the tileing |
private void |
storeEnvelope(java.lang.String dir,
double res,
double xmin,
double ymin,
double xmax,
double ymax)
|
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 TileImageTree2.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 boolean geoTiff
private java.util.HashMap featColl
Constructor Detail |
public TileImageTree2(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
Method Detail |
public void setProgressObserver(TileImageTree2.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 void storeEnvelope(java.lang.String dir, double res, double xmin, double ymin, double xmax, double ymax)
private void createWorldFile(java.lang.String dir, double xmin_, double ymin_, double xmax_, double ymax_, double tilex, double tiley) throws java.lang.Exception
java.lang.Exception
private java.lang.String saveTile(java.lang.String dir, double x, double y, java.awt.image.BufferedImage img) throws java.lang.Exception
java.lang.Exception
private org.w3c.dom.Element addDirectory(int tileWidth, int tileHeight, java.lang.String dirName, double widthCRS, double heightCRS, 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 |