Package com.luciad.shape.shape2D
Class TLcdLonLatPolypoint
java.lang.Object
com.luciad.shape.ALcdShape
com.luciad.shape.shape2D.ALcd2DEditableShape
com.luciad.shape.shape2D.ALcd2DEditablePolypoint
com.luciad.shape.shape2D.TLcdLonLatPolypoint
- All Implemented Interfaces:
ILcdBounded,ILcdPointList,ILcdPointList2,ILcdPolypoint,ILcdShape,ILcd2DEditablePointList,ILcd2DEditablePolypoint,ILcd2DEditableShape,ILcdCache,ILcdCloneable,ILcdInvalidateable,Serializable,Cloneable
- Direct Known Subclasses:
TLcdLonLatMPolypoint,TLcdLonLatPolygon,TLcdLonLatPolyline,TLcdLonLatRhumbPolygon,TLcdLonLatRhumbPolyline
public class TLcdLonLatPolypoint
extends ALcd2DEditablePolypoint
implements ILcd2DEditablePolypoint, ILcdCache
This class provides an implementation of
ILcd2DEditablePolypoint in the geodetic
space.
All longitude/latitude coordinates are expressed in degrees.
This class is thread-safe for concurrent read-only access of its contents. For read-write access, external locking must be used. Such locking is typically done at the model level.
Note that the ILcd2DEditablePointList representing the actual geometry should provide geodetic points (TLcdLonLatPoint), not cartesian (TLcdXYPoint).
- See Also:
-
Field Summary
Fields inherited from class com.luciad.shape.shape2D.ALcd2DEditablePolypoint
fBounds, fFocusPoint -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new, empty poly-point.TLcdLonLatPolypoint(ILcd2DEditablePointList a2DEditablePointList) Creates a new poly-point backed by the given pointlist.TLcdLonLatPolypoint(TLcdLonLatPolypoint aPolypoint, boolean aDeepCopy) Creates a poly-point based on another poly-point. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidComputes the bounds of the polypoint.protected voidComputes the focus point as the center of the bounding box.clone()Creates and returns a copy of this object.Methods inherited from class com.luciad.shape.shape2D.ALcd2DEditablePolypoint
clearCache, contains2D, equals, get2DEditablePointList, getBounds, getCachedObject, getFocusPoint, getPoint, getPointCount, getPointSFCT, getX, getY, getZ, hashCode, insert2DPoint, insertIntoCache, invalidateBounds, invalidateObject, move2D, move2DPoint, removeCachedObject, removePointAt, set2DEditablePointList, setFocusPoint, toString, translate2D, translate2DPointMethods inherited from class com.luciad.shape.shape2D.ALcd2DEditableShape
contains3D, move2DMethods inherited from class com.luciad.shape.ALcdShape
contains2D, contains3D, fromDomainObjectMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.luciad.shape.shape2D.ILcd2DEditablePointList
append2DPoint, insert2DPoint, move2DPoint, removePointAt, translate2D, translate2DPointMethods inherited from interface com.luciad.shape.shape2D.ILcd2DEditableShape
move2D, move2D, translate2DMethods inherited from interface com.luciad.shape.ILcdBounded
getBoundsMethods inherited from interface com.luciad.util.ILcdCache
clearCache, getCachedObject, insertIntoCache, removeCachedObjectMethods inherited from interface com.luciad.shape.ILcdPointList
getPoint, getPointCount, getPointSFCT, getX, getY, getZMethods inherited from interface com.luciad.shape.ILcdShape
contains2D, contains2D, contains3D, contains3D, getFocusPoint
-
Constructor Details
-
TLcdLonLatPolypoint
public TLcdLonLatPolypoint()Creates a new, empty poly-point. -
TLcdLonLatPolypoint
Creates a new poly-point backed by the given pointlist.- The point list and the points therein are not copied, and can be modified by this object
- The point list should contain
TLcdLonLatPoints
- Parameters:
a2DEditablePointList- the initial points
-
TLcdLonLatPolypoint
Creates a poly-point based on another poly-point.-
When
aDeepCopyis true, and the given polypoint has a cloneable pointlist (seeILcdCloneable, for exampleTLcd2DEditablePointList), the underlying points will be cloned. - Otherwise, the underlying polypoint is re-used by the new object, and updates affect both objects.
- Parameters:
aPolypoint- The object to copyaDeepCopy- whether to make a copy of the points, if possible
-
When
-
-
Method Details
-
calculateBounds
protected void calculateBounds()Description copied from class:ALcd2DEditablePolypointComputes the bounds of the polypoint. The resulting bounds are stored infBounds.- Specified by:
calculateBoundsin classALcd2DEditablePolypoint
-
calculateFocusPoint
protected void calculateFocusPoint()Description copied from class:ALcd2DEditablePolypointComputes the focus point as the center of the bounding box. The resulting point is stored infFocusPoint.- Overrides:
calculateFocusPointin classALcd2DEditablePolypoint
-
clone
Creates and returns a copy of this object. The contained editable points list is cloned. The cache, the bounds and the focus point are not copied or cloned at all, but recalculated when needed.- Specified by:
clonein interfaceILcdCloneable- Overrides:
clonein classALcd2DEditablePolypoint- See Also:
-