Class WktReader

java.lang.Object
org.apache.sedona.core.formatMapper.WktReader

public class WktReader extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static SpatialRDD<org.locationtech.jts.geom.Geometry>
    createSpatialRDD(org.apache.spark.api.java.JavaRDD rawTextRDD, FormatMapper<org.locationtech.jts.geom.Geometry> formatMapper)
     
    static SpatialRDD<org.locationtech.jts.geom.Geometry>
    readToGeometryRDD(org.apache.spark.api.java.JavaRDD rawTextRDD, int wktColumn, boolean allowInvalidGeometries, boolean skipSyntacticallyInvalidGeometries)
    Read a SpatialRDD from a string type rdd.
    static SpatialRDD<org.locationtech.jts.geom.Geometry>
    readToGeometryRDD(org.apache.spark.api.java.JavaSparkContext sc, String inputPath, int wktColumn, boolean allowInvalidGeometries, boolean skipSyntacticallyInvalidGeometries)
    Read a SpatialRDD from a file.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • WktReader

      public WktReader()
  • Method Details

    • readToGeometryRDD

      public static SpatialRDD<org.locationtech.jts.geom.Geometry> readToGeometryRDD(org.apache.spark.api.java.JavaSparkContext sc, String inputPath, int wktColumn, boolean allowInvalidGeometries, boolean skipSyntacticallyInvalidGeometries)
      Read a SpatialRDD from a file.
      Parameters:
      sc -
      inputPath -
      wktColumn - The column which contains the wkt string. Start from 0.
      allowInvalidGeometries - whether allows topology-invalid geometries exist in the generated RDD
      skipSyntacticallyInvalidGeometries - whether allows Sedona to automatically skip syntax-invalid geometries, rather than throw errors
      Returns:
    • readToGeometryRDD

      public static SpatialRDD<org.locationtech.jts.geom.Geometry> readToGeometryRDD(org.apache.spark.api.java.JavaRDD rawTextRDD, int wktColumn, boolean allowInvalidGeometries, boolean skipSyntacticallyInvalidGeometries)
      Read a SpatialRDD from a string type rdd.
      Parameters:
      rawTextRDD - a string type RDD
      wktColumn - The column which contains the wkt string. Start from 0.
      allowInvalidGeometries - whether allows topology-invalid geometries exist in the generated RDD
      skipSyntacticallyInvalidGeometries - whether allows Sedona to automatically skip syntax-invalid geometries, rather than throw errors
      Returns:
    • createSpatialRDD

      public static SpatialRDD<org.locationtech.jts.geom.Geometry> createSpatialRDD(org.apache.spark.api.java.JavaRDD rawTextRDD, FormatMapper<org.locationtech.jts.geom.Geometry> formatMapper)