- java.lang.Object
-
- java.lang.Enum<ShapeElementType>
-
- org.arakhne.afc.io.shape.ShapeElementType
-
- All Implemented Interfaces:
Serializable
,Comparable<ShapeElementType>
public enum ShapeElementType extends Enum<ShapeElementType>
Supported types of elements in an ESRI shape file.The specification of the ESRI Shape file format is described in the July 98 specification document.
- Since:
- 14.0
- Version:
- 17.0 2020-01-04 14:41:52
- Author:
- Stéphane GALLAND, Olivier LAMOTTE
- Maven Group Id:
- org.arakhne.afc.advanced
- Maven Artifact Id:
- shapefile
-
-
Enum Constant Summary
Enum Constants Enum Constant Description MULTIPATCH
The element is a multipatch.MULTIPOINT
The element is a collection of points.MULTIPOINT_M
The element is a multipoint with a measure.MULTIPOINT_Z
The element is a multipoint with Z coordinate and a measure.NULL
The element is not set.POINT
The element is a point.POINT_M
The element is a point with a measure.POINT_Z
The element is a point with Z coordinate and a measure.POLYGON
The element is a polygon.POLYGON_M
The element is a polygonwith a measure.POLYGON_Z
The element is a polygon with Z coordinate and a measure.POLYLINE
The element is a polyline.POLYLINE_M
The element is a polyline with a measure.POLYLINE_Z
The element is a polyline with Z coordinate and a measure.UNSUPPORTED
The type of element is unsupported yet.
-
Field Summary
Fields Modifier and Type Field Description int
shapeType
Is the type identifier used inside ESRI shape files.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ShapeElementType
fromESRIInteger(int esriNumber)
Replies the element type which is corresponding to the given number (from ESRI shape file specification).boolean
hasM()
Replies if this type of shape element supports the M coordinates.boolean
hasZ()
Replies if this type of shape element supports the Z coordinates.boolean
isElementCollectionType()
Replies if this type is a collection of element and not a ponctual element.boolean
isPonctualElementType()
Replies if this type is a ponctual element and not a collection of elements.static ShapeElementType
valueOf(String name)
Returns the enum constant of this type with the specified name.static ShapeElementType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNSUPPORTED
public static final ShapeElementType UNSUPPORTED
The type of element is unsupported yet.
-
NULL
public static final ShapeElementType NULL
The element is not set.
-
POINT
public static final ShapeElementType POINT
The element is a point.
-
POLYLINE
public static final ShapeElementType POLYLINE
The element is a polyline.
-
POLYGON
public static final ShapeElementType POLYGON
The element is a polygon.
-
MULTIPOINT
public static final ShapeElementType MULTIPOINT
The element is a collection of points.
-
POINT_Z
public static final ShapeElementType POINT_Z
The element is a point with Z coordinate and a measure.
-
POLYLINE_Z
public static final ShapeElementType POLYLINE_Z
The element is a polyline with Z coordinate and a measure.
-
POLYGON_Z
public static final ShapeElementType POLYGON_Z
The element is a polygon with Z coordinate and a measure.
-
MULTIPOINT_Z
public static final ShapeElementType MULTIPOINT_Z
The element is a multipoint with Z coordinate and a measure.
-
POINT_M
public static final ShapeElementType POINT_M
The element is a point with a measure.
-
POLYLINE_M
public static final ShapeElementType POLYLINE_M
The element is a polyline with a measure.
-
POLYGON_M
public static final ShapeElementType POLYGON_M
The element is a polygonwith a measure.
-
MULTIPOINT_M
public static final ShapeElementType MULTIPOINT_M
The element is a multipoint with a measure.
-
MULTIPATCH
public static final ShapeElementType MULTIPATCH
The element is a multipatch.
-
-
Method Detail
-
values
public static ShapeElementType[] 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 (ShapeElementType c : ShapeElementType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ShapeElementType 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
-
fromESRIInteger
@Pure public static ShapeElementType fromESRIInteger(int esriNumber)
Replies the element type which is corresponding to the given number (from ESRI shape file specification).- Parameters:
esriNumber
- is the number from the ESRI shape file specification.- Returns:
- the element type corresponding to the number.
-
hasZ
@Pure public boolean hasZ()
Replies if this type of shape element supports the Z coordinates.According to ESRI, only objects of type *_Z contain Z coordinates.
- Returns:
true
if the z-coordinate are supported, otherwisefalse
-
hasM
@Pure public boolean hasM()
Replies if this type of shape element supports the M coordinates.According to ESRI, objects of type *_Z or *_M contain M coordinates.
M coordinate has different meanings depending on the type of object: height from floor to top, some measure on object...
- Returns:
true
if the m-coordinate are supported, otherwisefalse
-
isPonctualElementType
@Pure public boolean isPonctualElementType()
Replies if this type is a ponctual element and not a collection of elements.- Returns:
true
if the type corresponds to a ponctual element, otherwisefalse
.- Since:
- 4.0
-
isElementCollectionType
@Pure public boolean isElementCollectionType()
Replies if this type is a collection of element and not a ponctual element.- Returns:
true
if the type corresponds to a collection of elements, otherwisefalse
.- Since:
- 4.0
-
-