|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.utils.progress.ProgressManager
org.geotools.utils.progress.BaseArgumentsManager
org.geotools.utils.imagemosaic.MosaicIndexBuilder
public class MosaicIndexBuilder
This class is in responsible for creating the index for a mosaic of images that we want to tie together as a single coverage.
To get instructions on how to run the tool just run it without any argument and a nice and clean help message will be printed to the command line.
Anyway an example of a suitable list of argumentBuilder can be seen here below:
-s H:\\work\\data\\merano_aime -w *.tif -name merano -abs
where:
It is worth to point out that this tool comes as a command line tool but it
has been built with GUI in mind . It has the capability to register
ProcessingEventListener
object that receive notifications about what
is going on. Moreover it delegates all the computations to an external
thread, hence we can stop the tool in the middle of processing with no so
many concerns (hopefully :-) ).
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 | |
---|---|
MosaicIndexBuilder()
Default constructor |
Method Summary | |
---|---|
void |
exceptionOccurred(ExceptionEvent event)
|
java.lang.String |
getIndexName()
|
void |
getNotification(ProcessingEvent event)
This method is repsonbile for sending the process progress events to the logger. |
protected double[] |
getResolution(GeneralEnvelope envelope,
java.awt.geom.Rectangle2D dim,
org.opengis.referencing.crs.CoordinateReferenceSystem crs)
This method is responsible for computing the resolutions in for the provided grid geometry in the provided crs. |
double |
getResolutionX()
|
double |
getResolutionY()
|
static void |
main(java.lang.String[] args)
Entry point for the index builder. |
boolean |
parseArgs(java.lang.String[] args)
|
void |
run()
Main thread for the mosaic index builder. |
void |
setIndexName(java.lang.String indexName)
|
void |
setLocationPath(java.lang.String locationPath)
|
void |
setWildcardString(java.lang.String wildcardString)
|
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 |
---|
public MosaicIndexBuilder()
Method Detail |
---|
public void run()
run
in interface java.lang.Runnable
run
in class ProgressManager
public static void main(java.lang.String[] args)
args
- public boolean parseArgs(java.lang.String[] args)
parseArgs
in class BaseArgumentsManager
protected final double[] getResolution(GeneralEnvelope envelope, java.awt.geom.Rectangle2D dim, org.opengis.referencing.crs.CoordinateReferenceSystem crs) throws DataSourceException
It is worth to note that the returned resolution array is of length of 2
and it always is lon, lat for the moment.
It might be worth to remove the axes reordering code when we are
confident enough with the code to handle the north-up crs.
TODO use orthodromic distance?
envelope
- the GeneralEnvelopedim
- crs
-
DataSourceException
public void getNotification(ProcessingEvent event)
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.
getNotification
in interface ProcessingEventListener
event
- is a ProcessingEvent
that informs the receiver on the
precetnage of the progress as well as on what is happening.public void exceptionOccurred(ExceptionEvent event)
exceptionOccurred
in interface ProcessingEventListener
public final void setLocationPath(java.lang.String locationPath)
locationPath
- the locationPath to setpublic final void setWildcardString(java.lang.String wildcardString)
wildcardString
- the wildcardString to setpublic java.lang.String getIndexName()
public void setIndexName(java.lang.String indexName)
public double getResolutionX()
public double getResolutionY()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |