org.geotools.geometry.jts.spatialschema.geometry.primitive
Class PointImpl

java.lang.Object
  extended by org.geotools.geometry.jts.spatialschema.geometry.GeometryImpl
      extended by org.geotools.geometry.jts.spatialschema.geometry.primitive.PointImpl
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, JTSGeometry, 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 GeometryImpl
implements org.opengis.geometry.primitive.Point

Basic data type for a geometric object consisting of one and only one point. In most cases, the state of a Point is fully determined by its position attribute. The only exception to this is if the Point has been subclassed to provide additional non-geometric information such as symbology.

Version:
$Revision $
Author:
SYS Technologies, crossley, cdillard
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.geotools.geometry.jts.spatialschema.geometry.GeometryImpl
GeometryImpl.MathTransformFilter
 
Constructor Summary
PointImpl()
          Creates a new PointImpl.
PointImpl(org.opengis.geometry.DirectPosition position)
          Creates a new PointImpl.
PointImpl(org.opengis.geometry.DirectPosition position, org.opengis.referencing.crs.CoordinateReferenceSystem crs)
          Creates a new PointImpl.
 
Method Summary
protected  com.vividsolutions.jts.geom.Geometry computeJTSPeer()
          Computes the JTS equivalent of this geometry.
 boolean equals(java.lang.Object obj)
           
 org.opengis.geometry.primitive.Bearing getBearing(org.opengis.geometry.coordinate.Position toPoint)
          Not supported in this implementation.
 org.opengis.geometry.primitive.PrimitiveBoundary getBoundary()
          Returns the boundary of this geometry.
 java.util.Set getComplexes()
           
 org.opengis.geometry.complex.Composite getComposite()
           
 java.util.Set getContainedPrimitives()
           
 java.util.Set getContainingPrimitives()
           
 org.opengis.geometry.DirectPosition getDirectPosition()
          Returns a copy of this point's position.
 org.opengis.geometry.DirectPosition getPosition()
          Deprecated. 
 org.opengis.geometry.primitive.OrientablePrimitive[] getProxy()
           
 int hashCode()
           
 void setDirectPosition(org.opengis.geometry.DirectPosition position)
          Makes a copy of the given point and keeps that copy around.
 void setPosition(org.opengis.geometry.DirectPosition position)
          Deprecated. 
 
Methods inherited from class org.geotools.geometry.jts.spatialschema.geometry.GeometryImpl
clone, contains, contains, difference, distance, equals, getBuffer, getCentroid, getClosure, getConvexHull, getCoordinateDimension, getCoordinateReferenceSystem, getDimension, getDistance, getEnvelope, getJTSGeometry, getMaximalComplex, getMbRegion, getPrecision, getRepresentativePoint, intersection, intersects, invalidateCachedJTSPeer, isCycle, isMutable, isSimple, listAsSet, setJTSPeer, setParent, symmetricDifference, toImmutable, transform, transform, union
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opengis.geometry.Geometry
clone, distance, getBuffer, getCentroid, getClosure, getConvexHull, getCoordinateDimension, getCoordinateReferenceSystem, getDimension, getEnvelope, getMaximalComplex, getMbRegion, getPrecision, getRepresentativePoint, isCycle, isMutable, isSimple, toImmutable, transform, transform
 
Methods inherited from interface org.opengis.geometry.TransfiniteSet
contains, contains, difference, equals, intersection, intersects, symmetricDifference, union
 

Constructor Detail

PointImpl

public PointImpl()
Creates a new PointImpl.


PointImpl

public PointImpl(org.opengis.geometry.DirectPosition position)
Creates a new PointImpl.

Parameters:
position -

PointImpl

public PointImpl(org.opengis.geometry.DirectPosition position,
                 org.opengis.referencing.crs.CoordinateReferenceSystem crs)
Creates a new PointImpl.

Parameters:
position -
crs -
Method Detail

getPosition

@Deprecated
public org.opengis.geometry.DirectPosition getPosition()
Deprecated. 

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

getDirectPosition

public org.opengis.geometry.DirectPosition getDirectPosition()
Returns a copy of this point's position. We must return a copy (and not a reference to our internal object), otherwise the caller could modify the values of the object and we would not know.

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 position)
                 throws org.opengis.geometry.UnmodifiableGeometryException
Deprecated. 

Specified by:
setPosition in interface org.opengis.geometry.primitive.Point
Throws:
org.opengis.geometry.UnmodifiableGeometryException

setDirectPosition

public void setDirectPosition(org.opengis.geometry.DirectPosition position)
                       throws org.opengis.geometry.UnmodifiableGeometryException
Makes a copy of the given point and keeps that copy around. If the given point is not in the same coordinate reference system as this primitive, then we attempt to convert it.

Specified by:
setDirectPosition in interface org.opengis.geometry.primitive.Point
Throws:
org.opengis.geometry.UnmodifiableGeometryException

getBoundary

public org.opengis.geometry.primitive.PrimitiveBoundary getBoundary()
Description copied from class: GeometryImpl
Returns the boundary of this geometry. Returns null if the boundary is empty.

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
Overrides:
getBoundary in class GeometryImpl

getBearing

public org.opengis.geometry.primitive.Bearing getBearing(org.opengis.geometry.coordinate.Position toPoint)
Not supported in this implementation.

Specified by:
getBearing in interface org.opengis.geometry.primitive.Point

computeJTSPeer

protected com.vividsolutions.jts.geom.Geometry computeJTSPeer()
Computes the JTS equivalent of this geometry.

Specified by:
computeJTSPeer in class GeometryImpl

getContainedPrimitives

public java.util.Set getContainedPrimitives()
Specified by:
getContainedPrimitives in interface org.opengis.geometry.primitive.Primitive

getContainingPrimitives

public java.util.Set getContainingPrimitives()
Specified by:
getContainingPrimitives in interface org.opengis.geometry.primitive.Primitive

getComplexes

public java.util.Set getComplexes()
Specified by:
getComplexes in interface org.opengis.geometry.primitive.Primitive

getComposite

public org.opengis.geometry.complex.Composite getComposite()
Specified by:
getComposite in interface org.opengis.geometry.primitive.Primitive

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

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 1996-2010 Geotools. All Rights Reserved.