Class GeoJsonReader
java.lang.Object
org.apache.sedona.core.formatMapper.GeoJsonReader
-
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) Read a SpatialRDD from a string type rdd.static SpatialRDD<org.locationtech.jts.geom.Geometry>readToGeometryRDD(org.apache.spark.api.java.JavaRDD rawTextRDD, 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) Read a SpatialRDD from a file.static SpatialRDD<org.locationtech.jts.geom.Geometry>readToGeometryRDD(org.apache.spark.api.java.JavaSparkContext sc, String inputPath, boolean allowInvalidGeometries, boolean skipSyntacticallyInvalidGeometries) Read a SpatialRDD from a file.
-
Constructor Details
-
GeoJsonReader
public GeoJsonReader()
-
-
Method Details
-
readToGeometryRDD
public static SpatialRDD<org.locationtech.jts.geom.Geometry> readToGeometryRDD(org.apache.spark.api.java.JavaSparkContext sc, String inputPath) Read a SpatialRDD from a file.- Parameters:
sc-inputPath-- Returns:
-
readToGeometryRDD
public static SpatialRDD<org.locationtech.jts.geom.Geometry> readToGeometryRDD(org.apache.spark.api.java.JavaSparkContext sc, String inputPath, boolean allowInvalidGeometries, boolean skipSyntacticallyInvalidGeometries) Read a SpatialRDD from a file.- Parameters:
sc-inputPath-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) Read a SpatialRDD from a string type rdd.- Parameters:
rawTextRDD- a string type RDD- Returns:
-
readToGeometryRDD
public static SpatialRDD<org.locationtech.jts.geom.Geometry> readToGeometryRDD(org.apache.spark.api.java.JavaRDD rawTextRDD, boolean allowInvalidGeometries, boolean skipSyntacticallyInvalidGeometries) Read a SpatialRDD from a string type rdd.- Parameters:
rawTextRDD- a string type RDDallowInvalidGeometries- 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)
-