org.geotools.utils.coveragetiler
Class CoverageTiler

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

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

This utility splits rasters into smaller pieces. One can control both the dimension of the tile that will be generated as well as the dimension of the internal tiles for the, improvements. This would allows us not only to break a big coverage into smaller tiles, but also to do the opposite. One may want to compose a mosaic and retile it into bigger tiles, well this can be easily done with this utility.

Example of usage:
CoverageTiler -t "8192,8192" -it "512,512" -s "/usr/home/tmp/myImage.tiff"

The tiles will be stored on the folder "/usr/home/tmp/tiled", which will be automatically created.

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
CoverageTiler()
          Default constructor
 
Method Summary
 void exceptionOccurred(ExceptionEvent event)
           
 double getCompressionRatio()
           
 java.lang.String getCompressionScheme()
           
 java.io.File getInputLocation()
           
 int getInternalTileHeight()
           
 int getInternalTileWidth()
           
 void getNotification(ProcessingEvent event)
          This method is responsible for sending the process progress events to the logger.
 java.io.File getOutputLocation()
           
 int getTileHeight()
           
 int 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 setOutputLocation(java.io.File outputLocation)
           
 void setTileHeight(int numTileY)
           
 void setTileWidth(int numTileX)
           
 
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

CoverageTiler

public CoverageTiler()
Default constructor

Method Detail

main

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

getNotification

public void getNotification(ProcessingEvent event)
This method is responsible for sending the process progress events to the logger.

It should be used to do normal logging when running this tools as command line tools but it should be disable when putting the tool behind a GUI. In such a case the GUI should register itself as a ProcessingEventListener and consume the processing events.

Specified by:
getNotification in interface ProcessingEventListener
Parameters:
event - is a ProcessingEvent that informs the receiver on the precetnage of the progress as well as on what is happening.

exceptionOccurred

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

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

parseArgs

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

getInputLocation

public java.io.File getInputLocation()

setInputLocation

public void setInputLocation(java.io.File inputLocation)

getTileWidth

public int getTileWidth()

setTileWidth

public void setTileWidth(int numTileX)

getTileHeight

public int getTileHeight()

setTileHeight

public void setTileHeight(int numTileY)

getOutputLocation

public java.io.File getOutputLocation()

setOutputLocation

public void setOutputLocation(java.io.File outputLocation)

getCompressionRatio

public final double getCompressionRatio()

setCompressionRatio

public final void setCompressionRatio(double compressionRatio)

getCompressionScheme

public final java.lang.String getCompressionScheme()

setCompressionScheme

public final void setCompressionScheme(java.lang.String compressionScheme)

getInternalTileHeight

public int getInternalTileHeight()

setInternalTileHeight

public void setInternalTileHeight(int internalTileHeight)

getInternalTileWidth

public int getInternalTileWidth()

setInternalTileWidth

public void setInternalTileWidth(int internalTileWidth)


Copyright © 1996-2010 Geotools. All Rights Reserved.