org.geotools.geometry.iso.primitive
Class PointImpl

java.lang.Object
  extended by org.geotools.geometry.iso.root.GeometryImpl
      extended by org.geotools.geometry.iso.primitive.PrimitiveImpl
          extended by org.geotools.geometry.iso.primitive.PointImpl
All Implemented Interfaces:
java.io.Serializable, org.opengis.geometry.coordinate.Position, org.opengis.geometry.Geometry, org.opengis.geometry.primitive.Point, org.opengis.geometry.primitive.Primitive, org.opengis.geometry.TransfiniteSet

public class PointImpl
extends PrimitiveImpl
implements org.opengis.geometry.primitive.Point

Point is the basic data type for a geometric object consisting of one and only one point.

Author:
Jackson Roehrig & Sanjay Jena
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.geotools.geometry.iso.primitive.PrimitiveImpl
complex, containedPrimitive, containingPrimitive
 
Fields inherited from class org.geotools.geometry.iso.root.GeometryImpl
crs, percision
 
Constructor Summary
PointImpl(org.opengis.referencing.crs.CoordinateReferenceSystem crs, DirectPositionImpl dp)
          The constructor PointImpl creates a Point at a given position, backed by the DirectPosition PointImpl::PointImpl(position : DirectPositionImpl) : PointImpl
PointImpl(org.opengis.geometry.DirectPosition position)
           
 
Method Summary
 PointImpl clone()
           
 boolean equals(org.opengis.geometry.TransfiniteSet pointSet)
           
 org.opengis.geometry.primitive.Bearing getBearing(org.opengis.geometry.coordinate.Position toPoint)
          The operation "bearing" returns the bearing, as a unit vector, of the tangent (at this Point) to the curve between this Point and a passed Position.
 org.opengis.geometry.primitive.PrimitiveBoundary getBoundary()
          The operation "getBoundary" is a specialization of the boundary operation at Object, and returns a NULL value indication an empty set.
 org.opengis.geometry.DirectPosition getCentroid()
           
 org.opengis.geometry.complex.Complex getClosure()
           
 int getDimension(org.opengis.geometry.DirectPosition point)
          The method getDimension returns the inherent dimension of this Object, which is less than or equal to the coordinate dimension.
 DirectPositionImpl getDirectPosition()
           
 org.opengis.geometry.Envelope getEnvelope()
          The method getEnvelope returns the minimum bounding box for this Object.
 DirectPositionImpl getPosition()
          Deprecated. 
 org.opengis.geometry.primitive.OrientablePrimitive[] getProxy()
           
 org.opengis.geometry.DirectPosition getRepresentativePoint()
           
 boolean isCycle()
           
 boolean isSimple()
           
 void setDirectPosition(org.opengis.geometry.DirectPosition p)
           
 void setPosition(org.opengis.geometry.DirectPosition p)
          Deprecated. 
 java.lang.String toString()
          Overwrite toString method for WKT output
 org.opengis.geometry.Geometry transform(org.opengis.referencing.crs.CoordinateReferenceSystem newCRS, org.opengis.referencing.operation.MathTransform transform)
           
 
Methods inherited from class org.geotools.geometry.iso.primitive.PrimitiveImpl
addComplex, addContainedPrimitive, addContainingPrimitive, getComplexes, getComposite, getContainedPrimitives, getContainingPrimitives, getMaximalComplex
 
Methods inherited from class org.geotools.geometry.iso.root.GeometryImpl
castToGeometryImpl, castToGeometryImpl, contains, contains, cRelate, crosses, difference, disjoint, distance, getBuffer, getConvexHull, getCoordinateDimension, getCoordinateReferenceSystem, getDistance, getMbRegion, getPositionFactory, getPrecision, intersection, intersects, isMutable, overlaps, relate, symmetricDifference, toImmutable, touches, transform, union, within
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.opengis.geometry.primitive.Primitive
getComplexes, getComposite, getContainedPrimitives, getContainingPrimitives
 
Methods inherited from interface org.opengis.geometry.Geometry
distance, getBuffer, getConvexHull, getCoordinateDimension, getCoordinateReferenceSystem, getMaximalComplex, getMbRegion, getPrecision, isMutable, toImmutable, transform
 
Methods inherited from interface org.opengis.geometry.TransfiniteSet
contains, contains, difference, intersection, intersects, symmetricDifference, union
 

Constructor Detail

PointImpl

public PointImpl(org.opengis.geometry.DirectPosition position)

PointImpl

public PointImpl(org.opengis.referencing.crs.CoordinateReferenceSystem crs,
                 DirectPositionImpl dp)
The constructor PointImpl creates a Point at a given position, backed by the DirectPosition PointImpl::PointImpl(position : DirectPositionImpl) : PointImpl

Parameters:
crs -
dp -
Method Detail

clone

public PointImpl clone()
                throws java.lang.CloneNotSupportedException
Specified by:
clone in interface org.opengis.geometry.Geometry
Specified by:
clone in class GeometryImpl
Throws:
java.lang.CloneNotSupportedException

getPosition

@Deprecated
public DirectPositionImpl getPosition()
Deprecated. 

Specified by:
getPosition in interface org.opengis.geometry.coordinate.Position

getDirectPosition

public DirectPositionImpl getDirectPosition()
Specified by:
getDirectPosition in interface org.opengis.geometry.coordinate.Position
Specified by:
getDirectPosition in interface org.opengis.geometry.primitive.Point

setPosition

@Deprecated
public void setPosition(org.opengis.geometry.DirectPosition p)
Deprecated. 

Sets the value of position

Specified by:
setPosition in interface org.opengis.geometry.primitive.Point
Parameters:
p -

setDirectPosition

public void setDirectPosition(org.opengis.geometry.DirectPosition p)
Specified by:
setDirectPosition in interface org.opengis.geometry.primitive.Point

toString

public java.lang.String toString()
Overwrite toString method for WKT output

Overrides:
toString in class java.lang.Object

getBearing

public org.opengis.geometry.primitive.Bearing getBearing(org.opengis.geometry.coordinate.Position toPoint)
The operation "bearing" returns the bearing, as a unit vector, of the tangent (at this Point) to the curve between this Point and a passed Position. Point::bearing(toPoint : Position) : Bearing The choice of the curve type for defining the bearing is dependent on the SC_CRS in which this Point is defined. For example, in the Mercator projection, the curve is the rhumb line. In 3D, geocentric coordinate system, the curve may be the geodesic joining the two points along the surface of the geoid or ellipsoid in use. Implementations that support this function shall specify the nature of the curve to be used. NOTE The type "Vector" is a common data type defined in ISO TS 19103.

Specified by:
getBearing in interface org.opengis.geometry.primitive.Point
Parameters:
toPoint -
Returns:
Bearing

getDimension

public int getDimension(org.opengis.geometry.DirectPosition point)
The method getDimension returns the inherent dimension of this Object, which is less than or equal to the coordinate dimension. The dimension of a collection of geometric objects is the largest dimension of any of its pieces. Points are 0-dimensional, curves are 1-dimensional, surfaces are 2-dimensional, and solids are 3-dimensional. Locally, the dimension of a geometric object at a point is the dimension of a local neighborhood of the point - that is the dimension of any coordinate neighborhood of the point. Dimension is unambiguously defined only for DirectPositions interior to this Object. If the passed DirectPosition2D is NULL, then the method returns the largest possible dimension for any DirectPosition2D in this Object.

Specified by:
getDimension in interface org.opengis.geometry.Geometry
Specified by:
getDimension in class GeometryImpl
Parameters:
point - a DirectPosition value
Returns:
the value 0 as int

getEnvelope

public org.opengis.geometry.Envelope getEnvelope()
The method getEnvelope returns the minimum bounding box for this Object. There are cases for which the min and max positions would be outside the domain of validity of the object's coordinate reference system. This method is included here only as an interface, as applications may choose to implement in different manners.

Specified by:
getEnvelope in interface org.opengis.geometry.Geometry
Specified by:
getEnvelope in class GeometryImpl
Returns:
an Envelope with zero width and length

getBoundary

public org.opengis.geometry.primitive.PrimitiveBoundary getBoundary()
The operation "getBoundary" is a specialization of the boundary operation at Object, and returns a NULL value indication an empty set. Point::boundary() : NULL

Specified by:
getBoundary in interface org.opengis.geometry.Geometry
Specified by:
getBoundary in interface org.opengis.geometry.primitive.Point
Specified by:
getBoundary in interface org.opengis.geometry.primitive.Primitive
Specified by:
getBoundary in class PrimitiveImpl
Returns:
null

getRepresentativePoint

public org.opengis.geometry.DirectPosition getRepresentativePoint()
Specified by:
getRepresentativePoint in interface org.opengis.geometry.Geometry
Specified by:
getRepresentativePoint in class GeometryImpl

isSimple

public boolean isSimple()
Specified by:
isSimple in interface org.opengis.geometry.Geometry

isCycle

public boolean isCycle()
Specified by:
isCycle in interface org.opengis.geometry.Geometry
Overrides:
isCycle in class GeometryImpl

getCentroid

public org.opengis.geometry.DirectPosition getCentroid()
Specified by:
getCentroid in interface org.opengis.geometry.Geometry
Overrides:
getCentroid in class GeometryImpl

getProxy

public org.opengis.geometry.primitive.OrientablePrimitive[] getProxy()
Specified by:
getProxy in interface org.opengis.geometry.primitive.Point
Specified by:
getProxy in interface org.opengis.geometry.primitive.Primitive
Specified by:
getProxy in class PrimitiveImpl

equals

public boolean equals(org.opengis.geometry.TransfiniteSet pointSet)
Specified by:
equals in interface org.opengis.geometry.TransfiniteSet
Overrides:
equals in class GeometryImpl

getClosure

public org.opengis.geometry.complex.Complex getClosure()
Specified by:
getClosure in interface org.opengis.geometry.Geometry
Overrides:
getClosure in class GeometryImpl

transform

public org.opengis.geometry.Geometry transform(org.opengis.referencing.crs.CoordinateReferenceSystem newCRS,
                                               org.opengis.referencing.operation.MathTransform transform)
                                        throws org.opengis.geometry.MismatchedDimensionException,
                                               org.opengis.referencing.operation.TransformException
Specified by:
transform in interface org.opengis.geometry.Geometry
Overrides:
transform in class GeometryImpl
Throws:
org.opengis.geometry.MismatchedDimensionException
org.opengis.referencing.operation.TransformException


Copyright © 1996-2010 Geotools. All Rights Reserved.