Class GeometryParser
java.lang.Object
org.apache.sis.internal.converter.SurjectiveConverter<String,double[]>
org.apache.sis.internal.storage.csv.GeometryParser
- All Implemented Interfaces:
Function<String,
,double[]> ObjectConverter<String,
double[]>
The converter to use for converting a text into a geometry.
This converter performs only the first step, the conversion to a
double[]
array.
The second step (the conversion to a geometry object) is performed after we collected all arrays.
The resulting geometry class depends on the library available at runtime.- Since:
- 0.8
- Version:
- 0.8
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final GeometryParser
The unique instance. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
Converts an element from the CSV file to the array type.Returns the type of elements to convert.Class<double[]>
Returns the type of converted elements.Methods inherited from class org.apache.sis.internal.converter.SurjectiveConverter
inverse, properties, toString
-
Field Details
-
INSTANCE
The unique instance.
-
-
Constructor Details
-
GeometryParser
private GeometryParser()For the singleton instance.
-
-
Method Details
-
getSourceClass
Returns the type of elements to convert.- Returns:
- the type of objects to convert.
-
getTargetClass
Returns the type of converted elements.- Returns:
- the type of converted objects.
-
apply
Converts an element from the CSV file to the array type.- Parameters:
text
- the object to convert, ornull
.- Returns:
- the converted object, or
null
.
-