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
 
 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
 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringPREFERENCE_KEY_ADJUST_PIN_GEO_POSstatic StringPROPERTY_NAME_DATETIMEstatic StringPROPERTY_NAME_GEOPOSstatic StringPROPERTY_NAME_LABELstatic StringPROPERTY_NAME_PIXELPOSstatic StringPROPERTY_NAME_STYLE_CSSstatic StringPROPERTY_NAME_TEXT- 
Fields inherited from class org.esa.snap.core.datamodel.ProductNodePROPERTY_NAME_DESCRIPTION, PROPERTY_NAME_NAME
 
- 
 - 
Constructor SummaryConstructors Constructor Description Placemark(PlacemarkDescriptor descriptor, org.opengis.feature.simple.SimpleFeature feature)Constructor.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidacceptVisitor(ProductVisitor visitor)Accepts the given visitor.static org.opengis.feature.simple.SimpleFeatureTypecreateGcpFeatureType()static org.opengis.feature.simple.SimpleFeatureTypecreateGeometryFeatureType()static org.opengis.feature.simple.SimpleFeatureTypecreatePinFeatureType()static org.opengis.feature.simple.SimpleFeatureTypecreatePointFeatureType(String name)static PlacemarkcreatePointPlacemark(PlacemarkDescriptor descriptor, String name, String label, String text, PixelPos pixelPos, GeoPos geoPos, GeoCoding geoCoding)Creates a point placemark.ObjectgetAttributeValue(String attributeName)Gets the attribute value of the underlying feature.PlacemarkDescriptorgetDescriptor()org.opengis.feature.simple.SimpleFeaturegetFeature()GeoPosgetGeoPos()StringgetLabel()PixelPosgetPixelPos()longgetRawStorageSize(ProductSubsetDef subsetDef)Returns an estimated, raw storage size in bytes of this placemark.StringgetStyleCss()StringgetText()voidsetAttributeValue(String attributeName, Object attributeValue)Sets the attribute value of the underlying feature.voidsetGeoPos(GeoPos geoPos)voidsetLabel(String label)Sets this placemark's label.voidsetPixelPos(PixelPos pixelPos)voidsetStyleCss(String styleCss)Sets this placemark's CSS style.voidsetText(String text)Sets this placemark's (XHTML) text.voidupdatePositions()Updates pixel and geo position according to the current geometry (model coordinates).- 
Methods inherited from class org.esa.snap.core.datamodel.ProductNodedispose, 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.ExtensibleObjectgetExtension
 
- 
 
- 
- 
- 
Field Detail- 
PREFERENCE_KEY_ADJUST_PIN_GEO_POSpublic static final String PREFERENCE_KEY_ADJUST_PIN_GEO_POS - See Also:
- Constant Field Values
 
 - 
PROPERTY_NAME_LABELpublic static final String PROPERTY_NAME_LABEL - See Also:
- Constant Field Values
 
 - 
PROPERTY_NAME_TEXTpublic static final String PROPERTY_NAME_TEXT - See Also:
- Constant Field Values
 
 - 
PROPERTY_NAME_PIXELPOSpublic static final String PROPERTY_NAME_PIXELPOS - See Also:
- Constant Field Values
 
 - 
PROPERTY_NAME_GEOPOSpublic static final String PROPERTY_NAME_GEOPOS - See Also:
- Constant Field Values
 
 - 
PROPERTY_NAME_DATETIMEpublic static final String PROPERTY_NAME_DATETIME - See Also:
- Constant Field Values
 
 - 
PROPERTY_NAME_STYLE_CSSpublic static final String PROPERTY_NAME_STYLE_CSS - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
Placemarkpublic 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- 
createPointPlacemarkpublic 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 in scene image coordinates. May be- null, if- geoPosis given.
- geoPos- The placemark's pixel position. May be- null, if- pixelPosis given.
- geoCoding- The product's scene geo-coding. Used to compute- pixelPosfrom- geoPos, if- pixelPosis- null.
- Returns:
- A new point placemark.
 
 - 
getDescriptorpublic PlacemarkDescriptor getDescriptor() - Returns:
- The placemark descriptor that created this placemark.
- Since:
- BEAM 4.10
 
 - 
getFeaturepublic final org.opengis.feature.simple.SimpleFeature getFeature() - Returns:
- The wrapped SimpleFeatureunderlying this placemark.
- Since:
- BEAM 4.7
 
 - 
getAttributeValuepublic 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.
 
 - 
setAttributeValuepublic 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.
 
 - 
setLabelpublic void setLabel(String label) Sets this placemark's label.- Parameters:
- label- the label, if- nullan empty label is set.
 
 - 
getLabelpublic String getLabel() - Returns:
- This placemark's label, cannot be null.
 
 - 
setTextpublic void setText(String text) Sets this placemark's (XHTML) text.- Parameters:
- text- The text, if- nullan empty text is set.
 
 - 
getTextpublic String getText() - Returns:
- This placemark's (XHTML) text, cannot be null.
 
 - 
setStyleCsspublic void setStyleCss(String styleCss) Sets this placemark's CSS style.- Parameters:
- styleCss- The text, if- nullan empty text is set.
- Since:
- BEAM 4.10
 
 - 
getStyleCsspublic String getStyleCss() - Returns:
- This placemark's CSS style, cannot be null.
- Since:
- BEAM 4.10
 
 - 
getRawStorageSizepublic long getRawStorageSize(ProductSubsetDef subsetDef) Returns an estimated, raw storage size in bytes of this placemark.- Specified by:
- getRawStorageSizein class- ProductNode
- Parameters:
- subsetDef- if not- nullthe subset may limit the size returned.
- Returns:
- the estimated size in bytes.
 
 - 
acceptVisitorpublic 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:
- acceptVisitorin class- ProductNode
- Parameters:
- visitor- the visitor
 
 - 
getPixelPospublic PixelPos getPixelPos() 
 - 
setPixelPospublic void setPixelPos(PixelPos pixelPos) 
 - 
getGeoPospublic GeoPos getGeoPos() 
 - 
setGeoPospublic void setGeoPos(GeoPos geoPos) 
 - 
updatePositionspublic void updatePositions() Updates pixel and geo position according to the current geometry (model coordinates).
 - 
createPinFeatureTypepublic static org.opengis.feature.simple.SimpleFeatureType createPinFeatureType() 
 - 
createGcpFeatureTypepublic static org.opengis.feature.simple.SimpleFeatureType createGcpFeatureType() 
 - 
createGeometryFeatureTypepublic static org.opengis.feature.simple.SimpleFeatureType createGeometryFeatureType() 
 - 
createPointFeatureTypepublic static org.opengis.feature.simple.SimpleFeatureType createPointFeatureType(String name) 
 
- 
 
-