Class WktReader
java.lang.Object
org.apache.sedona.core.formatMapper.WktReader
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
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 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)
-