Package org.gvsig.fmap.geom.type
Interface GeometryType
- All Known Subinterfaces:
PointGeometryType
- All Known Implementing Classes:
AbstractGeometryType
public interface GeometryType
This class represents the type of a geometry. All the geometries has to have
a type that can be retrieved using the
Geometry.getGeometryType() method.- Author:
- Jorge Piera
-
Method Summary
Modifier and TypeMethodDescriptioncreate()This method creates aGeometrywith 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.getAlias()intReturn the full name of this geometry type.getGeometryOperation(int index) Get the operation for this geometry at a concrete positiongetName()intint[]intgetType()booleanhasM()booleanhasZ()booleanisSubTypeOf(int geometrySubType) Check if a geometry subType inherits of other subType.booleanisSubTypeOf(GeometryType geometryType) Check if a geometry subType inherits of other subType.booleanisTypeOf(int geometryType) Check if a geometry type inherits of other type.booleanisTypeOf(GeometryType geometryType) Check if a geometry type inherits of other type.voidsetGeometryOperation(int index, GeometryOperation geomOp) Registers an operation for this geometry type.toString()
-
Method Details
-
getName
String getName()- Returns:
- the name of the geometry type.
-
getFullName
String getFullName()Return the full name of this geometry type. It include the type name and the subtype name.- Returns:
- the full name of the geometry type
-
addAlias
-
getAlias
Collection<String> getAlias() -
getType
int getType()- Returns:
- the type of the geometry. It is a constant value that has to be
one of the values in
Geometry.TYPESThe type is an abstract representation of the object (Point, Curve...) but it is not a concrete representation (Point2D, Point3D...).
-
getSubType
int getSubType()- 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
boolean isTypeOf(int 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...- Parameters:
geometryType- the value of theGeometry.TYPESto check if is it super type- Returns:
- true if the the parameter is a super type of this geometry type
-
isSubTypeOf
boolean isSubTypeOf(int geometrySubType) 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.- Parameters:
geometrySubType- the value of theGeometry.SUBTYPESto check if is it super subType- Returns:
- true if the the parameter is a super subType of this geometry type
-
isTypeOf
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...- Parameters:
geometryType- the geometry type to check if is it super type- Returns:
- if the the parameter is a super type of this geometry type
-
isSubTypeOf
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.- Parameters:
geometryType- the geometry type to check if is it super subtype- Returns:
- if the the parameter is a super subType of this geometry type
-
create
This method creates aGeometrywith 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.- Returns:
- A empty geometry
- Throws:
CreateGeometryException
-
setGeometryOperation
Registers an operation for this geometry type.- Parameters:
index-geomOp-
-
getGeometryOperation
Get the operation for this geometry at a concrete position- Parameters:
index- The position of the operation- Returns:
- A geometry operation
-
toString
String toString() -
getDimension
int getDimension() -
hasZ
boolean hasZ() -
hasM
boolean hasM() -
getGeometryClass
Class getGeometryClass() -
getSuperTypes
int[] getSuperTypes()
-