Package com.luciad.geometries.observable
Class ObservablePolygonUtil
java.lang.Object
com.luciad.geometries.observable.ObservablePolygonUtil
This class provides utility methods for
Observable
instance for Polygon
.- Since:
- 2024.1
-
Method Summary
Modifier and TypeMethodDescriptionstatic Observable
<@Nullable Geometry> deriveExteriorPolylineRing
(Observable<@Nullable Polygon> observablePolygon) Derives anObservable
from the given observable polygon that represents the exterior ring of the polygon.static Observable
<@Nullable Geometry> deriveInteriorPolylineRing
(Observable<@Nullable Polygon> observablePolygon, long index) Derives anObservable
from the given observable polygon that represents an interior ring of the polygon.
-
Method Details
-
deriveExteriorPolylineRing
@NotNull public static Observable<@Nullable Geometry> deriveExteriorPolylineRing(@NotNull Observable<@Nullable Polygon> observablePolygon) Derives anObservable
from the given observable polygon that represents the exterior ring of the polygon.This observable geometry will be updated when the given observable exterior polyline ring changes.
Notes:
- When the observable polygon contains a
null
value, the returned observable instance will contain anull
value too. Observable#setValue
will throw an exception for derived instances.
- Parameters:
observablePolygon
- an observable polygon from which to derive the exterior polyline ring- Returns:
- a derived
Observable
- When the observable polygon contains a
-
deriveInteriorPolylineRing
@NotNull public static Observable<@Nullable Geometry> deriveInteriorPolylineRing(@NotNull Observable<@Nullable Polygon> observablePolygon, long index) Derives anObservable
from the given observable polygon that represents an interior ring of the polygon.This observable geometry will be updated when the given observable interior polyline ring changes.
Notes:
- When the observable polygon contains a
null
value, the returned observable instance will contain anull
value too. Observable#setValue
will throw an exception for derived instances.
- Parameters:
observablePolygon
- an observable polygon from which to derive the interior polyline ringindex
- the index of the interior ring- Returns:
- a derived
Observable
- When the observable polygon contains a
-