Class JtsGeometryConverter

java.lang.Object
org.esa.snap.core.util.converters.JtsGeometryConverter
All Implemented Interfaces:
Converter<org.locationtech.jts.geom.Geometry>

public class JtsGeometryConverter extends Object implements Converter<org.locationtech.jts.geom.Geometry>
  • Constructor Details

    • JtsGeometryConverter

      public JtsGeometryConverter()
  • Method Details

    • getValueType

      public Class<? extends org.locationtech.jts.geom.Geometry> getValueType()
      Description copied from interface: Converter
      Gets the value type.
      Specified by:
      getValueType in interface Converter<org.locationtech.jts.geom.Geometry>
      Returns:
      The value type.
    • parse

      public org.locationtech.jts.geom.Geometry parse(String text) throws ConversionException
      Description copied from interface: Converter
      Converts a value from its plain text representation to a Java object instance of the type returned by Converter.getValueType().
      Specified by:
      parse in interface Converter<org.locationtech.jts.geom.Geometry>
      Parameters:
      text - The textual representation of the value.
      Returns:
      The converted value.
      Throws:
      ConversionException - If the conversion fails.
    • format

      public String format(org.locationtech.jts.geom.Geometry value)
      Description copied from interface: Converter
      Converts a value of the type returned by Converter.getValueType() to its plain text representation.
      Specified by:
      format in interface Converter<org.locationtech.jts.geom.Geometry>
      Parameters:
      value - The value to be converted to text.
      Returns:
      The textual representation of the value.
    • registerConverter

      public static void registerConverter()