Class AbstractPlacemarkDescriptor
- java.lang.Object
-
- org.esa.snap.core.datamodel.AbstractPlacemarkDescriptor
-
- All Implemented Interfaces:
PlacemarkDescriptor
- Direct Known Subclasses:
GenericPlacemarkDescriptor
,GeometryDescriptor
,PointPlacemarkDescriptor
public abstract class AbstractPlacemarkDescriptor extends Object implements PlacemarkDescriptor
The base class forPlacemarkDescriptor
implementations.- Since:
- BEAM 4.10
-
-
Field Summary
Fields Modifier and Type Field Description static String
PROPERTY_NAME_DEFAULT_GEOMETRY
static String
PROPERTY_NAME_PLACEMARK_DESCRIPTOR
-
Constructor Summary
Constructors Constructor Description AbstractPlacemarkDescriptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Placemark
createPlacemark(org.opengis.feature.simple.SimpleFeature feature)
Creates a new placemark by wrapping the given feature.DecodeQualification
getCompatibilityFor(org.opengis.feature.simple.SimpleFeatureType featureType)
Gets the compatibility for the givenfeatureType
with respect to the placemarks created by this descriptor.Point
getCursorHotSpot()
Image
getCursorImage()
PlacemarkGroup
getPlacemarkGroup(Product product)
String
getShowLayerCommandId()
void
setUserDataOf(org.opengis.feature.simple.SimpleFeatureType compatibleFeatureType)
Asks the descriptor to set any application specific information in the feature type's user data.GeoPos
updateGeoPos(GeoCoding geoCoding, PixelPos pixelPos, GeoPos geoPos)
PixelPos
updatePixelPos(GeoCoding geoCoding, GeoPos geoPos, PixelPos pixelPos)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.esa.snap.core.datamodel.PlacemarkDescriptor
getBaseFeatureType, getRoleLabel, getRoleName
-
-
-
-
Field Detail
-
PROPERTY_NAME_PLACEMARK_DESCRIPTOR
public static final String PROPERTY_NAME_PLACEMARK_DESCRIPTOR
- See Also:
- Constant Field Values
-
PROPERTY_NAME_DEFAULT_GEOMETRY
public static final String PROPERTY_NAME_DEFAULT_GEOMETRY
- See Also:
- Constant Field Values
-
-
Method Detail
-
createPlacemark
public Placemark createPlacemark(org.opengis.feature.simple.SimpleFeature feature)
Creates a new placemark by wrapping the given feature. The default implementation returnsnew Placemark(this, feature)
.- Specified by:
createPlacemark
in interfacePlacemarkDescriptor
- Parameters:
feature
- The feature to be wrapped.- Returns:
- The new placemark.
-
getCompatibilityFor
public DecodeQualification getCompatibilityFor(org.opengis.feature.simple.SimpleFeatureType featureType)
Description copied from interface:PlacemarkDescriptor
Gets the compatibility for the givenfeatureType
with respect to the placemarks created by this descriptor.The method shall only return
DecodeQualification.INTENDED
, if the descriptor was designed for interpreting the given feature type, e.g. by inspecting thefeatureType
's user data which may be set byPlacemarkDescriptor.setUserDataOf(org.opengis.feature.simple.SimpleFeatureType)
.The method may return
DecodeQualification.SUITABLE
, if thePlacemarkDescriptor.createPlacemark(org.opengis.feature.simple.SimpleFeature)
method can successfully create a new placemark from a feature having the compatiblefeatureType
.- Specified by:
getCompatibilityFor
in interfacePlacemarkDescriptor
- Parameters:
featureType
- The feature type to be tested.- Returns:
true
, if thefeatureType
is compatible.
-
setUserDataOf
public void setUserDataOf(org.opengis.feature.simple.SimpleFeatureType compatibleFeatureType)
Description copied from interface:PlacemarkDescriptor
Asks the descriptor to set any application specific information in the feature type's user data. When called, the framework has already classified the given feature type as beingDecodeQualification.INTENDED
orDecodeQualification.SUITABLE
by consulting the methodPlacemarkDescriptor.getCompatibilityFor(org.opengis.feature.simple.SimpleFeatureType)
.Implementors of this method may consider setting specific user data that allows
PlacemarkDescriptor.getCompatibilityFor(org.opengis.feature.simple.SimpleFeatureType)
to returnDecodeQualification.INTENDED
after e.g. data has been deserialized from a persistent data store.- Specified by:
setUserDataOf
in interfacePlacemarkDescriptor
- Parameters:
compatibleFeatureType
- A compatible feature type whose user data may or may not be altered.
-
getPlacemarkGroup
public PlacemarkGroup getPlacemarkGroup(Product product)
- Specified by:
getPlacemarkGroup
in interfacePlacemarkDescriptor
-
updatePixelPos
public PixelPos updatePixelPos(GeoCoding geoCoding, GeoPos geoPos, PixelPos pixelPos)
- Specified by:
updatePixelPos
in interfacePlacemarkDescriptor
-
updateGeoPos
public GeoPos updateGeoPos(GeoCoding geoCoding, PixelPos pixelPos, GeoPos geoPos)
- Specified by:
updateGeoPos
in interfacePlacemarkDescriptor
-
getShowLayerCommandId
public String getShowLayerCommandId()
- Specified by:
getShowLayerCommandId
in interfacePlacemarkDescriptor
-
getCursorImage
public Image getCursorImage()
- Specified by:
getCursorImage
in interfacePlacemarkDescriptor
-
getCursorHotSpot
public Point getCursorHotSpot()
- Specified by:
getCursorHotSpot
in interfacePlacemarkDescriptor
-
-