org.esa.beam.framework.datamodel
Class Placemark

java.lang.Object
  extended by com.bc.ceres.core.ExtensibleObject
      extended by org.esa.beam.framework.datamodel.ProductNode
          extended by org.esa.beam.framework.datamodel.Placemark
All Implemented Interfaces:
com.bc.ceres.core.Extensible

public class Placemark
extends ProductNode

Placemarks are displayed as symbols at the image's pixel position corresponding to their geographical position. The name is displayed as label next to the symbol. If the user moves the mouse over a placemark, the textual description property shall appear as tool-tip text. Single placemarks can be selected either by mouse-click or by the ? Prev./Next Placemark tool. Placemarks are contained in the active product and stored in CSV format. To share placemarks between products, the placemarks of a product can be imported and exported.

Since:
BEAM 2.0 (full revision since BEAM 4.10)
Version:
2.0
Author:
Norman Fomferra

Field Summary
static String PLACEMARK_FEATURE_TYPE_NAME
          Deprecated. 
static String PROPERTY_NAME_DATETIME
           
static String PROPERTY_NAME_GEOPOS
           
static String PROPERTY_NAME_LABEL
           
static String PROPERTY_NAME_PIXELPOS
           
static String PROPERTY_NAME_STYLE_CSS
           
static String PROPERTY_NAME_TEXT
           
 
Fields inherited from class org.esa.beam.framework.datamodel.ProductNode
PROPERTY_NAME_DESCRIPTION, PROPERTY_NAME_NAME
 
Constructor Summary
Placemark(PlacemarkDescriptor descriptor, org.opengis.feature.simple.SimpleFeature feature)
          Constructor.
 
Method Summary
 void acceptVisitor(ProductVisitor visitor)
          Accepts the given visitor.
static org.opengis.feature.simple.SimpleFeatureType createGcpFeatureType()
           
static org.opengis.feature.simple.SimpleFeatureType createGeometryFeatureType()
           
static org.opengis.feature.simple.SimpleFeatureType createPinFeatureType()
           
static org.opengis.feature.simple.SimpleFeatureType createPointFeatureType(String name)
           
static Placemark createPointPlacemark(PlacemarkDescriptor descriptor, String name, String label, String text, PixelPos pixelPos, GeoPos geoPos, GeoCoding geoCoding)
          Creates a point placemark.
 Object getAttributeValue(String attributeName)
          Gets the attribute value of the underlying feature.
 PlacemarkDescriptor getDescriptor()
           
 org.opengis.feature.simple.SimpleFeature getFeature()
           
 GeoPos getGeoPos()
           
 String getLabel()
           
 PixelPos getPixelPos()
           
 long getRawStorageSize(ProductSubsetDef subsetDef)
          Returns an estimated, raw storage size in bytes of this placemark.
 String getStyleCss()
           
 String getText()
           
 void setAttributeValue(String attributeName, Object attributeValue)
          Sets the attribute value of the underlying feature.
 void setGeoPos(GeoPos geoPos)
           
 void setLabel(String label)
          Sets this placemark's label.
 void setPixelPos(PixelPos pixelPos)
           
 void setStyleCss(String styleCss)
          Sets this placemark's CSS style.
 void setText(String text)
          Sets this placemark's (XHTML) text.
 void updatePositions()
          Updates pixel and geo position according to the current geometry (model coordinates).
 
Methods inherited from class org.esa.beam.framework.datamodel.ProductNode
dispose, fireProductNodeChanged, fireProductNodeChanged, getDescription, getDisplayName, getName, getOwner, getProduct, getProductReader, getProductReaderSafe, getProductRefString, getProductSafe, getProductWriter, getProductWriterSafe, getRawStorageSize, isModified, isPartOfSubset, isValidNodeName, removeFromFile, setDescription, setModified, setName, setOwner, toString, updateExpression
 
Methods inherited from class com.bc.ceres.core.ExtensibleObject
getExtension
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PLACEMARK_FEATURE_TYPE_NAME

@Deprecated
public static final String PLACEMARK_FEATURE_TYPE_NAME
Deprecated. 
See Also:
Constant Field Values

PROPERTY_NAME_LABEL

public static final String PROPERTY_NAME_LABEL
See Also:
Constant Field Values

PROPERTY_NAME_TEXT

public static final String PROPERTY_NAME_TEXT
See Also:
Constant Field Values

PROPERTY_NAME_PIXELPOS

public static final String PROPERTY_NAME_PIXELPOS
See Also:
Constant Field Values

PROPERTY_NAME_GEOPOS

public static final String PROPERTY_NAME_GEOPOS
See Also:
Constant Field Values

PROPERTY_NAME_DATETIME

public static final String PROPERTY_NAME_DATETIME
See Also:
Constant Field Values

PROPERTY_NAME_STYLE_CSS

public static final String PROPERTY_NAME_STYLE_CSS
See Also:
Constant Field Values
Constructor Detail

Placemark

public Placemark(PlacemarkDescriptor descriptor,
                 org.opengis.feature.simple.SimpleFeature feature)
Constructor.

Parameters:
descriptor - The placemark descriptor that created this placemark.
feature - The wrapped feature.
Method Detail

createPointPlacemark

public static Placemark createPointPlacemark(PlacemarkDescriptor descriptor,
                                             String name,
                                             String label,
                                             String text,
                                             PixelPos pixelPos,
                                             GeoPos geoPos,
                                             GeoCoding geoCoding)
Creates a point placemark.

Parameters:
descriptor - The placemark descriptor that created this placemark.
name - The placemark's name.
label - The placemark's label. May be null.
text - The placemark's (XHTML) text. May be null.
pixelPos - The placemark's pixel position. May be null, if geoPos is given.
geoPos - The placemark's pixel position. May be null, if pixelPos is given.
geoCoding - The placemark's geo-coding. Used to compute pixelPos from geoPos, if pixelPos is null.
Returns:
A new point placemark.

getDescriptor

public PlacemarkDescriptor getDescriptor()
Returns:
The placemark descriptor that created this placemark.
Since:
BEAM 4.10

getFeature

public final org.opengis.feature.simple.SimpleFeature getFeature()
Returns:
The wrapped SimpleFeature underlying this placemark.
Since:
BEAM 4.7

getAttributeValue

public Object getAttributeValue(String attributeName)
Gets the attribute value of the underlying feature.

Parameters:
attributeName - The feature's attribute name.
Returns:
The feature's attribute value, may be null.

setAttributeValue

public void setAttributeValue(String attributeName,
                              Object attributeValue)
Sets the attribute value of the underlying feature.

Parameters:
attributeName - The feature's attribute name.
attributeValue - The feature's attribute value, may be null.

setLabel

public void setLabel(String label)
Sets this placemark's label.

Parameters:
label - the label, if null an empty label is set.

getLabel

public String getLabel()
Returns:
This placemark's label, cannot be null.

setText

public void setText(String text)
Sets this placemark's (XHTML) text.

Parameters:
text - The text, if null an empty text is set.

getText

public String getText()
Returns:
This placemark's (XHTML) text, cannot be null.

setStyleCss

public void setStyleCss(String styleCss)
Sets this placemark's CSS style.

Parameters:
styleCss - The text, if null an empty text is set.
Since:
BEAM 4.10

getStyleCss

public String getStyleCss()
Returns:
This placemark's CSS style, cannot be null.
Since:
BEAM 4.10

getRawStorageSize

public long getRawStorageSize(ProductSubsetDef subsetDef)
Returns an estimated, raw storage size in bytes of this placemark.

Specified by:
getRawStorageSize in class ProductNode
Parameters:
subsetDef - if not null the subset may limit the size returned.
Returns:
the estimated size in bytes.

acceptVisitor

public void acceptVisitor(ProductVisitor visitor)
Accepts the given visitor. This method implements the well known 'Visitor' design pattern of the gang-of-four. The visitor pattern allows to define new operations on the product data model without the need to add more code to it. The new operation is implemented by the visitor.

Specified by:
acceptVisitor in class ProductNode
Parameters:
visitor - the visitor

getPixelPos

public PixelPos getPixelPos()

setPixelPos

public void setPixelPos(PixelPos pixelPos)

getGeoPos

public GeoPos getGeoPos()

setGeoPos

public void setGeoPos(GeoPos geoPos)

updatePositions

public void updatePositions()
Updates pixel and geo position according to the current geometry (model coordinates).


createPinFeatureType

public static org.opengis.feature.simple.SimpleFeatureType createPinFeatureType()

createGcpFeatureType

public static org.opengis.feature.simple.SimpleFeatureType createGcpFeatureType()

createGeometryFeatureType

public static org.opengis.feature.simple.SimpleFeatureType createGeometryFeatureType()

createPointFeatureType

public static org.opengis.feature.simple.SimpleFeatureType createPointFeatureType(String name)


Copyright © 2002-2013 Brockmann Consult GmbH. All Rights Reserved.