Class ShapeType
java.lang.Object
org.h2gis.functions.io.shp.internal.ShapeType
Not much but a type safe enumeration of file types as ints and names. The
descriptions can easily be tied to a ResourceBundle if someone wants to do that.
- Author:
- Ian Schneider
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ShapeTypeRepresents an Arc shape (id = 3).static final ShapeTypeRepresents an ArcM shape (id = 23).static final ShapeTypeRepresents an ArcZ shape (id = 13).final intThe integer id of this ShapeType.static final ShapeTypeRepresents a MultiPoint shape (id = 8).static final ShapeTypeRepresents a MultiPointZ shape (id = 28).static final ShapeTypeRepresents a MultiPointZ shape (id = 18).final StringThe human-readable name for this ShapeType.
Could easily use ResourceBundle for internationialization.static final ShapeTypeRepresents a Null shape (id = 0).static final ShapeTypeRepresents a Point shape (id = 1).static final ShapeTypeRepresents a PointM shape (id = 21).static final ShapeTypeRepresents a PointZ shape (id = 11).static final ShapeTypeRepresents a Polygon shape (id = 5).static final ShapeTypeRepresents a PolygonM shape (id = 25).static final ShapeTypeRepresents a PolygonZ shape (id = 15).static final ShapeTypeRepresents an Undefined shape (id = -1). -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
NULL
Represents a Null shape (id = 0). -
POINT
Represents a Point shape (id = 1). -
POINTZ
Represents a PointZ shape (id = 11). -
POINTM
Represents a PointM shape (id = 21). -
ARC
Represents an Arc shape (id = 3). -
ARCZ
Represents an ArcZ shape (id = 13). -
ARCM
Represents an ArcM shape (id = 23). -
POLYGON
Represents a Polygon shape (id = 5). -
POLYGONZ
Represents a PolygonZ shape (id = 15). -
POLYGONM
Represents a PolygonM shape (id = 25). -
MULTIPOINT
Represents a MultiPoint shape (id = 8). -
MULTIPOINTZ
Represents a MultiPointZ shape (id = 18). -
MULTIPOINTM
Represents a MultiPointZ shape (id = 28). -
UNDEFINED
Represents an Undefined shape (id = -1). -
id
public final int idThe integer id of this ShapeType. -
name
The human-readable name for this ShapeType.
Could easily use ResourceBundle for internationialization.
-
-
Constructor Details
-
ShapeType
Creates a new instance of ShapeType. Hidden on purpose.- Parameters:
id- The id.name- The name.
-
-
Method Details
-
toString
Get the name of this ShapeType. -
isMultiPoint
public boolean isMultiPoint()Is this a multipoint shape? Hint- all shapes are multipoint except NULL, UNDEFINED, and the POINTs.- Returns:
- true if multipoint, false otherwise.
-
isPointType
public boolean isPointType() -
isLineType
public boolean isLineType() -
isPolygonType
public boolean isPolygonType() -
isMultiPointType
public boolean isMultiPointType() -
forID
Determine the ShapeType for the id.- Parameters:
id- The id to search for.- Returns:
- The ShapeType for the id.
-
getShapeHandler
Each ShapeType corresponds to a handler. In the future this should probably go else where to allow different handlers, or something...- Returns:
- The correct handler for this ShapeType. Returns a new one.
- Throws:
ShapefileException- If the ShapeType is bogus.
-