org.openjump.core.rasterimage
Class AddRasterImageLayerWizard

java.lang.Object
  extended by org.openjump.core.ui.swing.wizard.AbstractWizardGroup
      extended by org.openjump.core.rasterimage.AddRasterImageLayerWizard
All Implemented Interfaces:
WizardGroup

public class AddRasterImageLayerWizard
extends AbstractWizardGroup


Field Summary
protected  boolean allwaysLookForTFWExtension
           
static java.lang.String KEY
           
protected  java.lang.String KEY_ALLWAYSACCEPT_TWF_EXT
           
protected  java.lang.String KEY_ZOOM_TO_INSERTED_IMAGE
           
protected  PropertiesHandler properties
           
protected static java.lang.String propertiesFile
           
protected  WorldFileHandler worldFileHandler
           
protected  boolean zoomToInsertedImage
           
 
Constructor Summary
AddRasterImageLayerWizard(WorkbenchContext workbenchContext)
           
AddRasterImageLayerWizard(WorkbenchContext workbenchContext, java.io.File[] files)
           
 
Method Summary
protected  com.vividsolutions.jts.geom.Envelope getGeoReferencing(java.lang.String fileName, boolean allwaysLookForTFWExtension, java.awt.Point imageDimensions, WorkbenchContext context)
          TODO: [sstein] Feb.2009 - I discovered a 0.5px offset towards south-east for the envelope, in comparison with images loaded with Jon's/VividSolutions implementation, if the envelope is obtained from a worldfile.
 void initialize(WorkbenchContext workbenchContext, WizardDialog dialog)
           
 void open(java.io.File file, TaskMonitor monitor)
           
 void run(WizardDialog dialog, TaskMonitor monitor)
          Load the files selected in the wizard.
 
Methods inherited from class org.openjump.core.ui.swing.wizard.AbstractWizardGroup
addPanel, addPanel, getFirstId, getIcon, getName, getPanels, removeAllPanels, removePanel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY

public static final java.lang.String KEY

properties

protected PropertiesHandler properties

worldFileHandler

protected WorldFileHandler worldFileHandler

propertiesFile

protected static java.lang.String propertiesFile

KEY_ALLWAYSACCEPT_TWF_EXT

protected java.lang.String KEY_ALLWAYSACCEPT_TWF_EXT

KEY_ZOOM_TO_INSERTED_IMAGE

protected java.lang.String KEY_ZOOM_TO_INSERTED_IMAGE

allwaysLookForTFWExtension

protected boolean allwaysLookForTFWExtension

zoomToInsertedImage

protected boolean zoomToInsertedImage
Constructor Detail

AddRasterImageLayerWizard

public AddRasterImageLayerWizard(WorkbenchContext workbenchContext)

AddRasterImageLayerWizard

public AddRasterImageLayerWizard(WorkbenchContext workbenchContext,
                                 java.io.File[] files)
Method Detail

initialize

public void initialize(WorkbenchContext workbenchContext,
                       WizardDialog dialog)
Specified by:
initialize in interface WizardGroup
Overrides:
initialize in class AbstractWizardGroup

run

public void run(WizardDialog dialog,
                TaskMonitor monitor)
Load the files selected in the wizard.

Parameters:
monitor - The task monitor.

open

public void open(java.io.File file,
                 TaskMonitor monitor)

getGeoReferencing

protected com.vividsolutions.jts.geom.Envelope getGeoReferencing(java.lang.String fileName,
                                                                 boolean allwaysLookForTFWExtension,
                                                                 java.awt.Point imageDimensions,
                                                                 WorkbenchContext context)
                                                          throws java.io.IOException
TODO: [sstein] Feb.2009 - I discovered a 0.5px offset towards south-east for the envelope, in comparison with images loaded with Jon's/VividSolutions implementation, if the envelope is obtained from a worldfile. Not sure what is correct. I.e. this implementation seems to assume that the worldfile coordinate system origin is the corner of the first pixel and not the center. I have corrected this in WorldFileHandler.readWorldFile()

Parameters:
fileName -
allwaysLookForTFWExtension -
imageDimensions -
context -
Returns:
Throws:
java.io.IOException