org.gvsig.fmap.geom.primitive.impl
Class Point2DGeometryType

java.lang.Object
  extended by org.gvsig.fmap.geom.type.AbstractGeometryType
      extended by org.gvsig.fmap.geom.primitive.impl.Point2DGeometryType
All Implemented Interfaces:
PointGeometryType, GeometryType
Direct Known Subclasses:
Point3DGeometryType

public class Point2DGeometryType
extends AbstractGeometryType
implements PointGeometryType

Geometry type implementation for the creation of Point2D objects.

Author:
gvSIG Team

Constructor Summary
Point2DGeometryType()
           
 
Method Summary
 Geometry create()
          This method creates a Geometry with the type specified by this class.
 Point createPoint(double[] coordinates)
          Creates a new point object
 Point createPoint(double x, double y)
          Creates a new point object
 String getName()
           
 int getSubType()
           
 int getType()
           
 boolean isSubTypeOf(int geometrySubType)
          Check if a geometry subType inherits of other subType.
 boolean isTypeOf(int geometryType)
          Check if a geometry type inherits of other type.
 
Methods inherited from class org.gvsig.fmap.geom.type.AbstractGeometryType
equals, getGeometryOperation, getGeometryOperations, isSubTypeOf, isTypeOf, setGeometryOperation, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.gvsig.fmap.geom.type.GeometryType
getGeometryOperation, isSubTypeOf, isTypeOf, setGeometryOperation, toString
 

Constructor Detail

Point2DGeometryType

public Point2DGeometryType()
Method Detail

getName

public String getName()
Specified by:
getName in interface GeometryType
Returns:
the name of the geometry type.

getType

public int getType()
Specified by:
getType in interface GeometryType
Returns:
the type of the geometry. It is a constant value that has to be one of the values in Geometry.TYPES The type is an abstract representation of the object (Point, Curve...) but it is not a concrete representation (Point2D, Point3D...).

getSubType

public int getSubType()
Specified by:
getSubType in interface GeometryType
Returns:
the subtype of the geometry. It is a constant value that has to be one of the values in Geometry.SUBTYPES. The subtype represents a set of geometries with a dimensional relationship (2D, 3D, 2DM...)

isTypeOf

public boolean isTypeOf(int geometryType)
Description copied from interface: GeometryType
Check if a geometry type inherits of other type. E.g: the super type of an arc could be a a curve, the super type of a circle could be a surface...

Specified by:
isTypeOf in interface GeometryType
Parameters:
geometryType - the value of the Geometry.TYPES to check if is it super type
Returns:
if the the parameter is a super type of this geometry type

isSubTypeOf

public boolean isSubTypeOf(int geometrySubType)
Description copied from interface: GeometryType
Check if a geometry subType inherits of other subType. E.g: the super Subtype of a geometry 3D could be a geometry 2D, because the 3D extends the behavior of a geometry 2D.

Specified by:
isSubTypeOf in interface GeometryType
Parameters:
geometrySubType - the value of the Geometry.SUBTYPES to check if is it super subType
Returns:
if the the parameter is a super subType of this geometry type

create

public Geometry create()
                throws CreateGeometryException
Description copied from interface: GeometryType
This method creates a Geometry with the type specified by this class. The geometry is empty, and all the internal attributes must be assigned to a value when the geometry has been created.

Specified by:
create in interface GeometryType
Returns:
A empty geometry
Throws:
CreateGeometryException

createPoint

public Point createPoint(double x,
                         double y)
Description copied from interface: PointGeometryType
Creates a new point object

Specified by:
createPoint in interface PointGeometryType
Parameters:
x - the x coordinate of the point
y - the y coordinate of the point
Returns:
the new point

createPoint

public Point createPoint(double[] coordinates)
Description copied from interface: PointGeometryType
Creates a new point object

Specified by:
createPoint in interface PointGeometryType
Parameters:
coordinates - the coordinates of the point
Returns:
the new point


Copyright © 2004-2013 gvSIG. All Rights Reserved.