org.geotools.utils.imagepyramid
Class PyramidLayerBuilder

java.lang.Object
  extended by org.geotools.utils.progress.ProgressManager
      extended by org.geotools.utils.progress.BaseArgumentsManager
          extended by org.geotools.utils.imagepyramid.PyramidLayerBuilder
All Implemented Interfaces:
java.lang.Runnable, java.util.EventListener, ProcessingEventListener

public class PyramidLayerBuilder
extends BaseArgumentsManager
implements java.lang.Runnable, ProcessingEventListener

Usage:
PyramidLayerBuilder -h -v -s -t -f -a -o -p -c

                                                                                                                                            
                         where:                                                                                                                   
                          -h : Prints a nice command line Help                                                                                    
                          -v : Prints the tools Version                                                                                           
                          -s : Is the path where the raster(s) is(are) located                                                                    
                          -t : Is the tile dimensions as a couple width,height in pixels (e.g. 512,512)                                           
                          -f : Represents the scale factor. If you want a raster which is 1/2 resolution                                          
                               of the original, f should be 2                                                                                     
                          -a : Represents the Scaling algorithm to use. You can choose among one of the following                                 
                               nn, bil, avg, filt                                                                                                 
                          -o : Represents the output format. It can be one of the following                                                       
                               tiff, tif, gtiff, gtif, png, jpeg                                                                                  
                          -p : Is the Thread Priority, a number between 1 and 10 -> 1 [LOW] - 5 [MED] - 10 [HIGH]                              
                          -c : Represents the JAI TileCache dimension. This is an optional parameter which allows                                 
                               you to tune the tool performances.                                                                                 
 

Example of usage:
PyramidLayerBuilder -t "512,512" -s "/usr/home/tmp/tiled/world.200412.3x21600x21600.a1_ref.shp" -f 2 -a nn -c 512

Version:
0.3
Author:
Simone Giannecchini, GeoSolutions, Alessio Fabiani. GeoSolutions

Nested Class Summary
 
Nested classes/interfaces inherited from class org.geotools.utils.progress.ProgressManager
ProgressManager.ProgressEventDispatchThreadEventLauncher
 
Field Summary
 
Fields inherited from class org.geotools.utils.progress.BaseArgumentsManager
argumentBuilder, DEFAULT_IMAGEIO_CACHING_BEHAVIOUR, DEFAULT_PRIORITY, DEFAULT_TILE_CACHE_SIZE, optionBuilder
 
Constructor Summary
PyramidLayerBuilder()
           
 
Method Summary
 void exceptionOccurred(ExceptionEvent event)
           
 double getCompressionRatio()
           
 java.lang.String getCompressionScheme()
           
 java.io.File getInputLocation()
           
 int getInternalTileHeight()
           
 int getInternalTileWidth()
           
 void getNotification(ProcessingEvent event)
           
 java.lang.String getOutputFormat()
           
 java.io.File getOutputLocation()
           
 java.lang.String getScaleAlgorithm()
           
 int getScaleFactor()
           
 double getTileHeight()
           
 double getTileWidth()
           
static void main(java.lang.String[] args)
           
 boolean parseArgs(java.lang.String[] args)
           
 void run()
          This method is responsible for doing the actual processing.
 void setCompressionRatio(double compressionRatio)
           
 void setCompressionScheme(java.lang.String compressionScheme)
           
 void setInputLocation(java.io.File inputLocation)
           
 void setInternalTileHeight(int internalTileHeight)
           
 void setInternalTileWidth(int internalTileWidth)
           
 void setOutputFormat(java.lang.String outputFormat)
           
 void setOutputLocation(java.io.File outputLocation)
           
 void setScaleAlgorithm(java.lang.String scaleAlgorithm)
           
 void setScaleFactor(int scaleFactor)
           
 void setTileHeight(int tileH)
           
 void setTileWidth(int tileW)
           
 
Methods inherited from class org.geotools.utils.progress.BaseArgumentsManager
addOption, addOptions, finishInitialization, getOptionValue, getOptionValue, getPriority, getTileCacheSize, getToolName, getVersion, hasOption, hasOption, removeOption, removeOptions, setUseImageIOCache
 
Methods inherited from class org.geotools.utils.progress.ProgressManager
addProcessingEventListener, dispose, fireEvent, fireException, fireException, getStopThread, removeAllProcessingEventListeners, removeProcessingEventListener, stopThread
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PyramidLayerBuilder

public PyramidLayerBuilder()
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.lang.IllegalArgumentException,
                        java.io.IOException,
                        java.lang.InterruptedException
Parameters:
args -
Throws:
java.io.IOException
java.lang.IllegalArgumentException
java.lang.InterruptedException

parseArgs

public boolean parseArgs(java.lang.String[] args)
Overrides:
parseArgs in class BaseArgumentsManager

run

public void run()
Description copied from class: ProgressManager
This method is responsible for doing the actual processing.

Specified by:
run in interface java.lang.Runnable
Specified by:
run in class ProgressManager

getNotification

public void getNotification(ProcessingEvent event)
Specified by:
getNotification in interface ProcessingEventListener

exceptionOccurred

public void exceptionOccurred(ExceptionEvent event)
Specified by:
exceptionOccurred in interface ProcessingEventListener

setInputLocation

public void setInputLocation(java.io.File inputLocation)

setOutputLocation

public void setOutputLocation(java.io.File outputLocation)

getOutputFormat

public java.lang.String getOutputFormat()
Returns:
the outputFormat

setOutputFormat

public void setOutputFormat(java.lang.String outputFormat)
Parameters:
outputFormat - the outputFormat to set

getScaleAlgorithm

public java.lang.String getScaleAlgorithm()
Returns:
the scaleAlgorithm

setScaleAlgorithm

public void setScaleAlgorithm(java.lang.String scaleAlgorithm)
Parameters:
scaleAlgorithm - the scaleAlgorithm to set

getScaleFactor

public int getScaleFactor()
Returns:
the scaleFactor

setScaleFactor

public void setScaleFactor(int scaleFactor)
Parameters:
scaleFactor - the scaleFactor to set

getInputLocation

public java.io.File getInputLocation()

getOutputLocation

public java.io.File getOutputLocation()

getTileHeight

public double getTileHeight()
Returns:
the tileH

setTileHeight

public void setTileHeight(int tileH)
Parameters:
tileH - the tileH to set

getTileWidth

public double getTileWidth()
Returns:
the tileW

setTileWidth

public void setTileWidth(int tileW)
Parameters:
tileW - the tileW to set

getCompressionRatio

public double getCompressionRatio()

getCompressionScheme

public java.lang.String getCompressionScheme()

setCompressionRatio

public void setCompressionRatio(double compressionRatio)

setCompressionScheme

public void setCompressionScheme(java.lang.String compressionScheme)

getInternalTileHeight

public int getInternalTileHeight()

getInternalTileWidth

public int getInternalTileWidth()

setInternalTileHeight

public void setInternalTileHeight(int internalTileHeight)

setInternalTileWidth

public void setInternalTileWidth(int internalTileWidth)


Copyright © 1996-2010 Geotools. All Rights Reserved.