Package org.esa.snap.core.dataio.dimap
Class DimapProductWriterPlugIn
- java.lang.Object
-
- org.esa.snap.core.dataio.dimap.DimapProductWriterPlugIn
-
- All Implemented Interfaces:
ProductIOPlugIn
,ProductWriterPlugIn
public class DimapProductWriterPlugIn extends Object implements ProductWriterPlugIn
TheDimapProductWriterPlugIn
class is the plug-in entry-point for the BEAM-DIMAP product writer.Version history:
Version Comment 1.0 initial version BEAM version 1.0 1.0.1 product.description now saved to <DATASET_COMMENTS> inside <Dataset_use> 1.0.2 MapInfo modified:
SceneWidth and SceneHeight added
affected tag:
<MAP_INFO> inside <Geocoding_Map> inside <Coordinate_Reference_System>1.1.0 Band modified:
ScalingFactor, ScalingOffset and Log10Scaled properties added
affected tag:
<Spectral_Band_Info> inside <Image_Interpretation>
new tags added:
<SCALING_FACTOR> <SCALING_OFFSET> <LOG_10_SCALED>
1.1.1 Supports now VirtualBand
.
affected tag:
<Spectral_Band_Info> inside <Image_Interpretation>
new tags added ifBand
was aVirtualBand
:
<VIRTUAL_BAND> <CHECK_INVALIDS> <EXPRESSION> <INVALID_VALUE> <USE_INVALID_VALUE>
1.1.2 Supports now cyclic TiePointGrid
.
affected tag:
<Tie_Point_Grid_Info> inside <Tie_Point_Grids>
new tag added:
<CYCLIC>
1.2.0 Now supports Pin
.
new tag added:
<Pin>
and inside:
<DESCRIPTION> <LATITUDE> <LONGITUDE>
1.3.0 Now supports GAMMA
for contrast stretch.
affected tag:
<Band_Statistics> inside <Image_Display>
new tags added:
<GAMMA>
Now supportsValidMasks
for bands.
affected tag:
<Spectral_Band_Info> inside <Image_Interpretation>
new tags added:
<VALID_MASK_TERM>
1.4.0 Now the MapGeocoding was written in a new style <Coordinate_Reference_System> <GEO_TABLES version="1.0">CUSTOM</GEO_TABLES> // notMandatory <Horizontal_CS> <HORIZONTAL_CS_TYPE>PROJECTED</HORIZONTAL_CS_TYPE> // notMandatory <HORIZONTAL_CS_NAME>" + projectionName + "</HORIZONTAL_CS_NAME> // notMandatory <Geographic_CS> <GEOGRAPHIC_CS_NAME>" + projectionName + "</GEOGRAPHIC_CS_NAME> // notMandatory <Horizontal_Datum> <HORIZONTAL_DATUM_NAME>" + datumName + "</HORIZONTAL_DATUM_NAME> <Ellipsoid> <ELLIPSOID_NAME>" + ellipsoidName + "</ELLIPSOID_NAME> <Ellipsoid_Parameters> <ELLIPSOID_MAJ_AXIS unit="M">" + semiMajor + "</ELLIPSOID_MAJ_AXIS> <ELLIPSOID_MIN_AXIS unit="M">" + semiMinor + "</ELLIPSOID_MIN_AXIS> </Ellipsoid_Parameters> </Ellipsoid> </Horizontal_Datum> </Geographic_CS> <Projection> <NAME>" + projectionName + "</NAME> <Projection_CT_Method> <PROJECTION_CT_NAME>" + projectionTypeId + "</PROJECTION_CT_NAME> <Projection_Parameters> <!-- one or more <Projection_Parameter> elements --> <Projection_Parameter> <PROJECTION_PARAMETER_NAME>" + paramName + "</PROJECTION_PARAMETER_NAME> // notMandatory <PROJECTION_PARAMETER_VALUE unit="" + parameterUnit + "">" + parameterValues + "</PROJECTION_PARAMETER_VALUE> </Projection_Parameter> ... </Projection_Parameters> </Projection_CT_Method> </Projection> <MAP_INFO>" + mapInfo.toString + "</MAP_INFO> <!-- mapInfo.toString looks linke this: --> <!-- projectionName, pixelX, pixelY, easting, northing, pixelSizeX, pixelSizeY, datumName, units=mapUnit, sceneWidth, sceneHeight --> <!-- For example --> <!-- Lambert Conformal Conic, 0.0, 0.0, -1654216.0, 2025576.8, 5000.0, 5000.0, WGS-84, units=meter, 625, 1023 --> </Horizontal_CS> </Coordinate_Reference_System>
1.4.1 Now supports SceneRasterSensingStart
andSceneRasterSensingStop
of product.
Affected tag:
<Production>
new tags added:
<PRODUCT_SCENE_RASTER_START_TIME> <PRODUCT_SCENE_RASTER_STOP_TIME>
1.4.2 Since BEAM version 3.2 RasterDataNode
supports theNoDataValue
.
Affected tag:
<Spectral_Band_Info> inside of <Image_Interpretation>
Following tags are replaced:
<INVALID_VALUE> replaced by <NO_DATA_VALUE>
<USE_INVALID_VALUE> replaced by <NO_DATA_VALUE_USED>
2.0.0 Since version 3.5 BEAM supports FXYGeoCoding
.
New tags:
<Geoposition> <!-- Tha tag BAND_INDEX is only used if the geo-coding is writen per band --> <BAND_INDEX> index <BAND_INDEX> <Geoposition_Insert> <ULXMAP unit="M"> referencePixelX </ULXMAP> <ULYMAP unit="M"> referencePixelY </ULYMAP> <XDIM unit="M"> pixelSizeX </XDIM> <YDIM unit="M"> pixelSizeY </YDIM> </Geoposition_Insert> <Simplified_Location_Model> <Direct_Location_Model order="orderOfPolynom"> <lc_List> <lc index="i"> lonCoefficients[i] </lc> </lc_List> <pc_List> <pc index="i"> latCoefficients[i] </pc> </pc_List> </Direct_Location_Model> <Reverse_Location_Model order="orderOfPolynom"> <ic_List> <ic index="i"> iCoefficients[i] </ic> </ic_List> <jc_List> <jc index="i"> jCoefficients[i] </jc> </jc_List> </Reverse_Location_Model> </Simplified_Location_Model> </Geoposition>
Since version 3.5 BEAM supports MapInfo.setOrientation(float)
Affected tag:
<Map_Info> it is now written as follows:
<MAP_INFO> <PIXEL_X value="referencePixelX" /> <PIXEL_Y value="referencePixelY" /> <EASTING value="easting" /> <NORTHING value="northing" /> <ORIENTATION value="orientation" /> <PIXELSIZE_X value="pixelSizeX" /> <PIXELSIZE_Y value="pixelSizeY" /> <NODATA_VALUE value="noDataValue" /> <MAPUNIT value="mapUnit" /> <ORTHORECTIFIED value="orthorectified" /> <ELEVATION_MODEL value="elevModelName" /> <SCENE_FITTED value="sceneFitted" /> <SCENE_WIDTH value="sceneWidth" /> <SCENE_HEIGHT value="sceneHeight" /> <RESAMPLING value="resamplingName" /> </MAP_INFO>
2.1.0 Since version 3.6 BEAM supports GeneralFilterBand
andConvolutionFilterBand
.
Affected Tag:
The tag Spectral_Band_Info can now have the following new tags New tags:
ConvolutionFilterBand <Filter_Band_Info bandType="ConvolutionFilterBand"> <FILTER_SOURCE>bandName</FILTER_SOURCE> <Filter_Kernel> <KERNEL_WIDTH>kernelWidth</KERNEL_WIDTH> <KERNEL_HEIGHT>kernelHeight</KERNEL_HEIGHT> <KERNEL_FACTOR>kernelFactor</KERNEL_FACTOR> <KERNEL_DATA>kernelData[]</KERNEL_DATA> </Filter_Kernel> </Filter_Band_Info> GeneralFilterBand <Filter_Band_Info bandType="GeneralFilterBand"> <FILTER_SOURCE>bandName</FILTER_SOURCE> <FILTER_SUB_WINDOW_WIDTH>subWindowWidth</FILTER_SUB_WINDOW_WIDTH> <FILTER_SUB_WINDOW_HEIGHT>subWindowHeight</FILTER_SUB_WINDOW_HEIGHT> <FILTER_OPERATOR_CLASS_NAME>operatorClassName</FILTER_OPERATOR_CLASS_NAME> </Filter_Band_Info>
2.2.0 After a bugfixing in the ProductData classes, the DIMAP Product Format
have canged the output of uInt8, uInt16, uInt32 and UTC Values.-
Now the unsigned values are written as unsigned Values.
Formally the large unsigned values was written as complementary
negative values. -
Now the UTG Value was written as human readable text.
The UTC Value formally was written as a sequence of three values
which defines the date, the seconds an the microseconds fraction.
2.3.0 Since version 4.1 BEAM supports ground control points (GCPs), though the management of pins was redesgined. Pins and GCPs are stored in seperate groups.
New tags:
Pin_Group <Pin_Group> <Placemark> </Placemark> </Pin_Group> Gcp_Group <Gcp_Group> <Placemark> </Placemark> </Gcp_Group>
To harmonize the structure of the xml tree the Bitmask_Definition tag was moved to to a new surrounding tag. New tag:
Bitmask_Definitions <Bitmask_Definitions> <Bitmask_Definition> </Bitmask_Definition> </Bitmask_Definitions>
2.4.0 Since version BEAM 4.2, we have <NO_DATA_COLOR red="234" green="25" blue="0" alpha="255" /> <HISTOGRAM_MATCHING>Normalize</HISTOGRAM_MATCHING>
2.5.0 Since BEAM 4.5, the width and height tags within the GeneralFilterBand element are replaced by a size tag: These two tags <FILTER_SUB_WINDOW_WIDTH>subWindowWidth</FILTER_SUB_WINDOW_WIDTH> <FILTER_SUB_WINDOW_HEIGHT>subWindowHeight</FILTER_SUB_WINDOW_HEIGHT> are replaced by <FILTER_SUB_WINDOW_SIZE>subWindowSize</FILTER_SUB_WINDOW_SIZE>
2.6.0 Since BEAM 4.5.1 the band statistics tag is extended to beside the mininum and maximum value also the mean value and the standard deviation: These two tags are <STX_MEAN>meanValue</STX_MEAN> <STX_STD_DEV>stdDevValue</STX_STD_DEV>
2.6.1 No longer supporting <CHECK_INVALIDS>true</CHECK_INVALIDS>
2.7.0 Since version BEAM 4.6.2 BEAM-DIMAP supports PixelGeoCoding. <Geoposition> <LATITUDE_BAND> latBandName </LATITUDE_BAND> <LONGITUDE_BAND> lonBandName </LONGITUDE_BAND> <VALID_MASK_EXPRESSION> validMask </VALID_MASK_EXPRESSION> <SEARCH_RADIUS> searchRadius </SEARCH_RADIUS> <Pixel_Position_Estimator> <!-- GeoCoding of the pixel position estimator --> </Pixel_Position_Estimator> </Geoposition>
2.8.0 Since version BEAM 4.7 BEAM-DIMAP supports CrsGeoCoding. <Coordinate_Reference_System> <WKT> wktString </WKT> </Coordinate_Reference_System> <Geoposition> <IMAGE_TO_MODEL_TRANSFORM>matrix values</IMAGE_TO_MODEL_TRANSFORM> </Geoposition>
In addition, the persistence ofBitmaskDef
s is obsolete, becauseBitmaskDef
s have been marked as deprecated and replaced withMask
s.2.9.0 For BEAM 4.8, the element BAND_GROUPING has been introduced. <Image_Interpretation> <BAND_GROUPING>pattern-1:pattern-2:pattern-3</BAND_GROUPING> ... </Image_Interpretation>
In addition, the persistence ofBitmaskDef
s is obsolete, becauseBitmaskDef
s have been marked as deprecated and replaced withMask
s.2.10.0 For BEAM 4.9, the element Geoposition_Points has been introduced. <Geoposition_Points> <INTERPOLATION_METHOD>POLYNOMIAL[1|2|3]</INTERPOLATION_METHOD> <Original_Geocoding> ... </Original_Geocoding> </Geoposition_Points>
In addition, the persistence of theTiePointGeoCoding
is now written into theGeoposition
element.2.11.0 Since BEAM 4.10, Pins and Ground Control Points are written into the "vector_data" directory. The XML elements "Pin_Group" and "GCP_Group" with their "Placemark" children are not used anymore. Since BEAM 4.10, the XML elements "ROI", "ROI_Definition", and "ROI_ONE_DIMENSIONS" are not used anymore. Since SNAP 2.0, crs geocodings can be written per band. 2.13.0 The use of XML based DimapPersistables was replaced by a new markup language independent Persistence framework.
See the abstract classPersistenceConverter
and its extenders.- Version:
- $Revision$ $Date$
- See Also:
DimapProductWriter
-
-
Field Summary
Fields Modifier and Type Field Description static String
DIMAP_FORMAT_NAME
-
Constructor Summary
Constructors Constructor Description DimapProductWriterPlugIn()
Constructs a new BEAM-DIMAP product writer plug-in instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addWriterExtender(DimapProductWriter.WriterExtender writerExtender)
ProductWriter
createWriterInstance()
Creates an instance of the actual BEAM-DIMAP product writer class.String[]
getDefaultFileExtensions()
Gets the default file extensions associated with each of the format names returned by the
method.getFormatNames()
String
getDescription(Locale locale)
Gets a short description of this plug-in.EncodeQualification
getEncodeQualification(Product product)
Gets the encode qualification of this product writer plugin w.r.t.String[]
getFormatNames()
Returns a string array containing the single entry"BEAM-DIMAP"
.Class[]
getOutputTypes()
Returns an array containing the classes that represent valid output types for this BEAM-DIMAP product writer.SnapFileFilter
getProductFileFilter()
Gets an instance ofSnapFileFilter
for use in aJFileChooser
.void
removeWriterExtender(DimapProductWriter.WriterExtender writerExtender)
-
-
-
Field Detail
-
DIMAP_FORMAT_NAME
public static final String DIMAP_FORMAT_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getEncodeQualification
public EncodeQualification getEncodeQualification(Product product)
Description copied from interface:ProductWriterPlugIn
Gets the encode qualification of this product writer plugin w.r.t. the given product.- Specified by:
getEncodeQualification
in interfaceProductWriterPlugIn
- Parameters:
product
- The product.- Returns:
- The encode qualification.
-
getFormatNames
public String[] getFormatNames()
Returns a string array containing the single entry"BEAM-DIMAP"
.- Specified by:
getFormatNames
in interfaceProductIOPlugIn
- Returns:
- the names of the product formats handled by this product I/O plug-in, never
null
-
getDefaultFileExtensions
public String[] getDefaultFileExtensions()
Gets the default file extensions associated with each of the format names returned by the
method.getFormatNames()
The string array returned shall always have the same lenhth as the array returned by the
method.getFormatNames()
The extensions returned in the string array shall always include a leading colon ('.') character, e.g.
".hdf"
- Specified by:
getDefaultFileExtensions
in interfaceProductIOPlugIn
- Returns:
- the default file extensions for this product I/O plug-in, never
null
-
getOutputTypes
public Class[] getOutputTypes()
Returns an array containing the classes that represent valid output types for this BEAM-DIMAP product writer.Intances of the classes returned in this array are valid objects for the
writeProductNodes
method of theAbstractProductWriter
interface (the method will not throw anInvalidArgumentException
in this case).- Specified by:
getOutputTypes
in interfaceProductWriterPlugIn
- Returns:
- an array containing valid output types, never
null
- See Also:
AbstractProductWriter.writeProductNodes(org.esa.snap.core.datamodel.Product, java.lang.Object)
-
getDescription
public String getDescription(Locale locale)
Gets a short description of this plug-in. If the given locale is set tonull
the default locale is used.In a GUI, the description returned could be used as tool-tip text.
- Specified by:
getDescription
in interfaceProductIOPlugIn
- Parameters:
locale
- the locale name for the given decription string, ifnull
the default locale is used- Returns:
- a textual description of this product reader/writer
-
createWriterInstance
public ProductWriter createWriterInstance()
Creates an instance of the actual BEAM-DIMAP product writer class.- Specified by:
createWriterInstance
in interfaceProductWriterPlugIn
- Returns:
- a new instance of the
DimapProductWriter
class
-
getProductFileFilter
public SnapFileFilter getProductFileFilter()
Description copied from interface:ProductIOPlugIn
Gets an instance ofSnapFileFilter
for use in aJFileChooser
.- Specified by:
getProductFileFilter
in interfaceProductIOPlugIn
- Returns:
- a file filter or
null
if this plugin doesn't support file filter. If not provided, the reader will not be available in SNAP Desktop.
-
addWriterExtender
public void addWriterExtender(DimapProductWriter.WriterExtender writerExtender)
-
removeWriterExtender
public void removeWriterExtender(DimapProductWriter.WriterExtender writerExtender)
-
-