Package org.esa.snap.core.datamodel
Class Placemark
java.lang.Object
com.bc.ceres.core.ExtensibleObject
org.esa.snap.core.datamodel.ProductNode
org.esa.snap.core.datamodel.Placemark
- All Implemented Interfaces:
Extensible
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
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from class org.esa.snap.core.datamodel.ProductNode
PROPERTY_NAME_DESCRIPTION, PROPERTY_NAME_NAME
-
Constructor Summary
ConstructorsConstructorDescriptionPlacemark
(PlacemarkDescriptor descriptor, org.opengis.feature.simple.SimpleFeature feature) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
acceptVisitor
(ProductVisitor visitor) Accepts the given visitor.static org.opengis.feature.simple.SimpleFeatureType
static org.opengis.feature.simple.SimpleFeatureType
static org.opengis.feature.simple.SimpleFeatureType
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.getAttributeValue
(String attributeName) Gets the attribute value of the underlying feature.final org.opengis.feature.simple.SimpleFeature
getLabel()
long
getRawStorageSize
(ProductSubsetDef subsetDef) Returns an estimated, raw storage size in bytes of this placemark.getText()
void
setAttributeValue
(String attributeName, Object attributeValue) Sets the attribute value of the underlying feature.void
void
Sets this placemark's label.void
setPixelPos
(PixelPos pixelPos) void
setStyleCss
(String styleCss) Sets this placemark's CSS style.void
Sets this placemark's (XHTML) text.void
Updates pixel and geo position according to the current geometry (model coordinates).Methods inherited from class org.esa.snap.core.datamodel.ProductNode
dispose, fireProductNodeChanged, fireProductNodeChanged, getDescription, getDisplayName, getName, getOwner, getProduct, getProductReader, getProductReaderSafe, getProductRefString, getProductSafe, getProductWriter, getProductWriterSafe, getRawStorageSize, isModified, isPartOfSubset, isValidNodeName, removeFromFile, setDescription, setModified, setName, setNodeName, setOwner, toString, updateExpression
Methods inherited from class com.bc.ceres.core.ExtensibleObject
getExtension
-
Field Details
-
PREFERENCE_KEY_ADJUST_PIN_GEO_POS
- See Also:
-
PROPERTY_NAME_LABEL
- See Also:
-
PROPERTY_NAME_TEXT
- See Also:
-
PROPERTY_NAME_PIXELPOS
- See Also:
-
PROPERTY_NAME_GEOPOS
- See Also:
-
PROPERTY_NAME_DATETIME
- See Also:
-
PROPERTY_NAME_STYLE_CSS
- See Also:
-
-
Constructor Details
-
Placemark
Constructor.- Parameters:
descriptor
- The placemark descriptor that created this placemark.feature
- The wrapped feature.
-
-
Method Details
-
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 benull
.text
- The placemark's (XHTML) text. May benull
.pixelPos
- The placemark's pixel position in scene image coordinates. May benull
, ifgeoPos
is given.geoPos
- The placemark's pixel position. May benull
, ifpixelPos
is given.geoCoding
- The product's scene geo-coding. Used to computepixelPos
fromgeoPos
, ifpixelPos
isnull
.- Returns:
- A new point placemark.
-
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
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
Sets the attribute value of the underlying feature.- Parameters:
attributeName
- The feature's attribute name.attributeValue
- The feature's attribute value, may benull
.
-
setLabel
Sets this placemark's label.- Parameters:
label
- the label, ifnull
an empty label is set.
-
getLabel
- Returns:
- This placemark's label, cannot be
null
.
-
setText
Sets this placemark's (XHTML) text.- Parameters:
text
- The text, ifnull
an empty text is set.
-
getText
- Returns:
- This placemark's (XHTML) text, cannot be
null
.
-
setStyleCss
Sets this placemark's CSS style.- Parameters:
styleCss
- The text, ifnull
an empty text is set.- Since:
- BEAM 4.10
-
getStyleCss
- Returns:
- This placemark's CSS style, cannot be
null
. - Since:
- BEAM 4.10
-
getRawStorageSize
Returns an estimated, raw storage size in bytes of this placemark.- Specified by:
getRawStorageSize
in classProductNode
- Parameters:
subsetDef
- if notnull
the subset may limit the size returned.- Returns:
- the estimated size in bytes.
-
acceptVisitor
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 classProductNode
- Parameters:
visitor
- the visitor
-
getPixelPos
-
setPixelPos
-
getGeoPos
-
setGeoPos
-
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
-