public class Placemark extends ProductNode
Modifier and Type | Field and Description |
---|---|
static String |
PREFERENCE_KEY_ADJUST_PIN_GEO_POS |
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 |
PROPERTY_NAME_DESCRIPTION, PROPERTY_NAME_NAME
Constructor and Description |
---|
Placemark(PlacemarkDescriptor descriptor,
org.opengis.feature.simple.SimpleFeature feature)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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).
|
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
getExtension
public static final String PREFERENCE_KEY_ADJUST_PIN_GEO_POS
public static final String PROPERTY_NAME_LABEL
public static final String PROPERTY_NAME_TEXT
public static final String PROPERTY_NAME_PIXELPOS
public static final String PROPERTY_NAME_GEOPOS
public static final String PROPERTY_NAME_DATETIME
public static final String PROPERTY_NAME_STYLE_CSS
public Placemark(PlacemarkDescriptor descriptor, org.opengis.feature.simple.SimpleFeature feature)
descriptor
- The placemark descriptor that created this placemark.feature
- The wrapped feature.public static Placemark createPointPlacemark(PlacemarkDescriptor descriptor, String name, String label, String text, PixelPos pixelPos, GeoPos geoPos, GeoCoding geoCoding)
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 geoPos
is given.geoPos
- The placemark's pixel position. May be null
, if pixelPos
is given.geoCoding
- The product's scene geo-coding. Used to compute pixelPos
from geoPos
,
if pixelPos
is null
.public PlacemarkDescriptor getDescriptor()
public final org.opengis.feature.simple.SimpleFeature getFeature()
SimpleFeature
underlying this placemark.public Object getAttributeValue(String attributeName)
attributeName
- The feature's attribute name.null
.public void setAttributeValue(String attributeName, Object attributeValue)
attributeName
- The feature's attribute name.attributeValue
- The feature's attribute value, may be null
.public void setLabel(String label)
label
- the label, if null
an empty label is set.public String getLabel()
null
.public void setText(String text)
text
- The text, if null
an empty text is set.public String getText()
null
.public void setStyleCss(String styleCss)
styleCss
- The text, if null
an empty text is set.public String getStyleCss()
null
.public long getRawStorageSize(ProductSubsetDef subsetDef)
getRawStorageSize
in class ProductNode
subsetDef
- if not null
the subset may limit the size returned.public void acceptVisitor(ProductVisitor visitor)
acceptVisitor
in class ProductNode
visitor
- the visitorpublic PixelPos getPixelPos()
public void setPixelPos(PixelPos pixelPos)
public GeoPos getGeoPos()
public void setGeoPos(GeoPos geoPos)
public void updatePositions()
public static org.opengis.feature.simple.SimpleFeatureType createPinFeatureType()
public static org.opengis.feature.simple.SimpleFeatureType createGcpFeatureType()
public static org.opengis.feature.simple.SimpleFeatureType createGeometryFeatureType()
public static org.opengis.feature.simple.SimpleFeatureType createPointFeatureType(String name)
Copyright © 2014–2015 European Space Agency (ESA). All rights reserved.