Class WktReader
- java.lang.Object
-
- org.apache.sedona.core.formatMapper.WktReader
-
public class WktReader extends Object
-
-
Constructor Summary
Constructors Constructor Description WktReader()
-
Method Summary
All Methods Static Methods Concrete Methods 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.
-
-
-
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 RDDskipSyntacticallyInvalidGeometries
- 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 RDDwktColumn
- The column which contains the wkt string. Start from 0.allowInvalidGeometries
- whether allows topology-invalid geometries exist in the generated RDDskipSyntacticallyInvalidGeometries
- 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)
-
-