Package io.delta.kernel.types
Class GeographyType
Object
io.delta.kernel.types.DataType
io.delta.kernel.types.GeographyType
The data type representing geography values. A Geography must have a fixed Spatial Reference
System Identifier (SRID) that defines the coordinate system and an algorithm that determines how
geometric calculations are performed.
The SRID is specified as a string and the algorithm defines the calculation method. The engine is responsible for validating and interpreting the SRID and algorithm values.
- Since:
- 3.0.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGeographyType(String srid, String algorithm) Create a GeographyType with the specified SRID and algorithm. -
Method Summary
Modifier and TypeMethodDescriptionbooleanGet the algorithm for geometric calculations.getSRID()Get the Spatial Reference System Identifier.inthashCode()booleanisNested()Returns true iff this data is a nested data type (it logically parameterized by other types).static GeographyTypeofAlgorithm(String algorithm) Returns a GeographyType with the default SRID and the specified algorithm.static GeographyTypeReturns a GeographyType with the default SRID and algorithm.static GeographyTypeReturns a GeographyType with the specified SRID and default algorithm.Serialize this GeographyType to its string representation with minimal info.toString()Methods inherited from class io.delta.kernel.types.DataType
equivalent, isTypeValueBinaryLike, isWriteCompatible
-
Field Details
-
DEFAULT_SRID
- See Also:
-
DEFAULT_ALGORITHM
- See Also:
-
VALID_ALGORITHMS
-
-
Constructor Details
-
GeographyType
Create a GeographyType with the specified SRID and algorithm.- Parameters:
srid- the Spatial Reference System Identifier (any non-null, non-empty string)algorithm- the algorithm for geometric calculations (any non-null, non-empty string)- Throws:
IllegalArgumentException- if the SRID or algorithm is null or empty or algorithm is invalid
-
-
Method Details
-
ofDefault
Returns a GeographyType with the default SRID and algorithm. -
ofSRID
Returns a GeographyType with the specified SRID and default algorithm.- Parameters:
srid- the Spatial Reference System Identifier (any non-null, non-empty string)
-
ofAlgorithm
Returns a GeographyType with the default SRID and the specified algorithm.- Parameters:
algorithm- one of: spherical, vincenty, thomas, andoyer, karney
-
getSRID
Get the Spatial Reference System Identifier.- Returns:
- the SRID string
-
getAlgorithm
Get the algorithm for geometric calculations.- Returns:
- the algorithm string
-
isNested
public boolean isNested()Description copied from class:DataTypeReturns true iff this data is a nested data type (it logically parameterized by other types).For example StructType, ArrayType, MapType are nested data types.
-
simpleString
Serialize this GeographyType to its string representation with minimal info.- Returns:
- the serialized string representation
-
toString
-
equals
-
hashCode
public int hashCode()
-