Package org.geotools.data.shapefile.shp
Enum ShapeType
- Object
-
- Enum<ShapeType>
-
- ShapeType
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ARC
Represents an Arc shape (id = 3).ARCM
Represents an ArcM shape (id = 23).ARCZ
Represents an ArcZ shape (id = 13).MULTIPOINT
Represents a MultiPoint shape (id = 8).MULTIPOINTM
Represents a MultiPointM shape (id = 28).MULTIPOINTZ
Represents a MultiPointZ shape (id = 18).NULL
Represents a Null shape (id = 0).POINT
Represents a Point shape (id = 1).POINTM
Represents a PointM shape (id = 21).POINTZ
Represents a PointZ shape (id = 11).POLYGON
Represents a Polygon shape (id = 5).POLYGONM
Represents a PolygonM shape (id = 25).POLYGONZ
Represents a PolygonZ shape (id = 15).UNDEFINED
Represents an Undefined shape (id = -1).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ShapeType
forID(int id)
Determine the ShapeType for the id.ShapeHandler
getShapeHandler(GeometryFactory gf)
Each ShapeType corresponds to a handler.boolean
isLineType()
boolean
isMultiPoint()
Is this a multipoint shape?boolean
isMultiPointType()
boolean
isPointType()
boolean
isPolygonType()
String
toString()
Get the name of this ShapeType.static ShapeType
valueOf(String name)
Returns the enum constant of this type with the specified name.static ShapeType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NULL
public static final ShapeType NULL
Represents a Null shape (id = 0).
-
POINT
public static final ShapeType POINT
Represents a Point shape (id = 1).
-
POINTZ
public static final ShapeType POINTZ
Represents a PointZ shape (id = 11).
-
POINTM
public static final ShapeType POINTM
Represents a PointM shape (id = 21).
-
ARC
public static final ShapeType ARC
Represents an Arc shape (id = 3).
-
ARCZ
public static final ShapeType ARCZ
Represents an ArcZ shape (id = 13).
-
ARCM
public static final ShapeType ARCM
Represents an ArcM shape (id = 23).
-
POLYGON
public static final ShapeType POLYGON
Represents a Polygon shape (id = 5).
-
POLYGONZ
public static final ShapeType POLYGONZ
Represents a PolygonZ shape (id = 15).
-
POLYGONM
public static final ShapeType POLYGONM
Represents a PolygonM shape (id = 25).
-
MULTIPOINT
public static final ShapeType MULTIPOINT
Represents a MultiPoint shape (id = 8).
-
MULTIPOINTZ
public static final ShapeType MULTIPOINTZ
Represents a MultiPointZ shape (id = 18).
-
MULTIPOINTM
public static final ShapeType MULTIPOINTM
Represents a MultiPointM shape (id = 28).
-
UNDEFINED
public static final ShapeType UNDEFINED
Represents an Undefined shape (id = -1).
-
-
Method Detail
-
values
public static ShapeType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ShapeType c : ShapeType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ShapeType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
toString
public String toString()
Get the name of this ShapeType.- Overrides:
toString
in classEnum<ShapeType>
- Returns:
- The name.
-
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
public static ShapeType forID(int id)
Determine the ShapeType for the id.- Parameters:
id
- The id to search for.- Returns:
- The ShapeType for the id.
-
getShapeHandler
public ShapeHandler getShapeHandler(GeometryFactory gf) throws ShapefileException
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.
-
-