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[]>

final class GeometryParser extends SurjectiveConverter<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 Details

    • INSTANCE

      static final GeometryParser INSTANCE
      The unique instance.
  • Constructor Details

    • GeometryParser

      private GeometryParser()
      For the singleton instance.
  • Method Details

    • getSourceClass

      public Class<String> getSourceClass()
      Returns the type of elements to convert.
      Returns:
      the type of objects to convert.
    • getTargetClass

      public Class<double[]> getTargetClass()
      Returns the type of converted elements.
      Returns:
      the type of converted objects.
    • apply

      public double[] apply(String text)
      Converts an element from the CSV file to the array type.
      Parameters:
      text - the object to convert, or null.
      Returns:
      the converted object, or null.