Package mil.nga.sf.wkb
Class GeometryCodes
- java.lang.Object
-
- mil.nga.sf.wkb.GeometryCodes
-
public class GeometryCodes extends Object
Geometry Code utilities to convert between geometry attributes and geometry codes- Author:
- osbornb
-
-
Constructor Summary
Constructors Constructor Description GeometryCodes()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
getCode(Geometry geometry)
Get the geometry code from the geometrystatic int
getCode(GeometryType geometryType)
Get the geometry code from the geometry typestatic int
getCode(GeometryType geometryType, boolean hasZ, boolean hasM)
Get the geometry code from the geometry typestatic int
getGeometryMode(int code)
Get the geometry mode from the geometry code.static GeometryType
getGeometryType(int code)
Get the Geometry Type from the codestatic int
getWKBCode(Geometry geometry)
Get the well-known binary writable geometry code from the geometrystatic GeometryType
getWKBGeometryType(Geometry geometry)
Get the well-known binary writable geometry type from the geometrystatic boolean
hasM(int code)
Determine if the geometry code has a M (linear referencing system) valuestatic boolean
hasZ(int code)
Determine if the geometry code has a Z (3D) value
-
-
-
Method Detail
-
getCode
public static int getCode(Geometry geometry)
Get the geometry code from the geometry- Parameters:
geometry
- geometry- Returns:
- geometry code
-
getCode
public static int getCode(GeometryType geometryType, boolean hasZ, boolean hasM)
Get the geometry code from the geometry type- Parameters:
geometryType
- geometry typehasZ
- has zhasM
- mas m- Returns:
- geometry code
- Since:
- 2.0.3
-
getCode
public static int getCode(GeometryType geometryType)
Get the geometry code from the geometry type- Parameters:
geometryType
- geometry type- Returns:
- geometry code
-
getWKBCode
public static int getWKBCode(Geometry geometry)
Get the well-known binary writable geometry code from the geometry- Parameters:
geometry
- geometry- Returns:
- geometry code
- Since:
- 2.2.1
-
getWKBGeometryType
public static GeometryType getWKBGeometryType(Geometry geometry)
Get the well-known binary writable geometry type from the geometry- Parameters:
geometry
- geometry- Returns:
- geometry type
- Since:
- 2.2.1
-
getGeometryType
public static GeometryType getGeometryType(int code)
Get the Geometry Type from the code- Parameters:
code
- geometry type code- Returns:
- geometry type
-
hasZ
public static boolean hasZ(int code)
Determine if the geometry code has a Z (3D) value- Parameters:
code
- geometry code- Returns:
- true is has Z
-
hasM
public static boolean hasM(int code)
Determine if the geometry code has a M (linear referencing system) value- Parameters:
code
- geometry code- Returns:
- true is has M
-
getGeometryMode
public static int getGeometryMode(int code)
Get the geometry mode from the geometry code. Returns the digit in the thousands place. (z is enabled when 1 or 3, m is enabled when 2 or 3)- Parameters:
code
- geometry code- Returns:
- geometry mode
-
-