Class WktReader


  • public class WktReader
    extends Object
    • Constructor Detail

      • WktReader

        public WktReader()
    • Method Detail

      • 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)