public class ShapefileReader extends Object
Constructor and Description |
---|
ShapefileReader() |
Modifier and Type | Method and Description |
---|---|
static LineStringRDD |
geometryToLineString(SpatialRDD geometryRDD)
convert geometry rdd to
|
static PointRDD |
geometryToPoint(SpatialRDD geometryRDD)
convert geometry rdd to
|
static PolygonRDD |
geometryToPolygon(SpatialRDD geometryRDD)
convert geometry rdd to
|
static BoundBox |
readBoundBox(org.apache.spark.api.java.JavaSparkContext sc,
String inputPath)
read and merge bound boxes of all shapefiles user input, if there is no, leave BoundBox null;
|
static List<String> |
readFieldNames(org.apache.spark.api.java.JavaSparkContext sc,
String inputPath) |
static SpatialRDD<org.locationtech.jts.geom.Geometry> |
readToGeometryRDD(org.apache.spark.api.java.JavaSparkContext sc,
String inputPath)
read shapefile in inputPath with default GeometryFactory and return an RDD of Geometry.
|
static SpatialRDD<org.locationtech.jts.geom.Geometry> |
readToGeometryRDD(org.apache.spark.api.java.JavaSparkContext sc,
String inputPath,
org.locationtech.jts.geom.GeometryFactory geometryFactory)
read shapefile in inputPath with customized GeometryFactory and return an RDD of Geometry.
|
static LineStringRDD |
readToLineStringRDD(org.apache.spark.api.java.JavaSparkContext sc,
String inputPath)
read shapefile and return as an LineStringRDD
|
static LineStringRDD |
readToLineStringRDD(org.apache.spark.api.java.JavaSparkContext sc,
String inputPath,
org.locationtech.jts.geom.GeometryFactory geometryFactory)
read shapefile with customized GeometryFactory and return as an LineStringRDD
|
static PointRDD |
readToPointRDD(org.apache.spark.api.java.JavaSparkContext sc,
String inputPath)
read shapefile and return as an PointRDD
|
static PointRDD |
readToPointRDD(org.apache.spark.api.java.JavaSparkContext sc,
String inputPath,
org.locationtech.jts.geom.GeometryFactory geometryFactory)
read shapefile with customized GeometryFactory and return as an PointRDD
|
static PolygonRDD |
readToPolygonRDD(org.apache.spark.api.java.JavaSparkContext sc,
String inputPath)
read shapefile and return as an PolygonRDD
|
static PolygonRDD |
readToPolygonRDD(org.apache.spark.api.java.JavaSparkContext sc,
String inputPath,
org.locationtech.jts.geom.GeometryFactory geometryFactory)
read shapefile with customized GeometryFactory and return as an PolygonRDD
|
public static SpatialRDD<org.locationtech.jts.geom.Geometry> readToGeometryRDD(org.apache.spark.api.java.JavaSparkContext sc, String inputPath)
sc
- inputPath
- public static SpatialRDD<org.locationtech.jts.geom.Geometry> readToGeometryRDD(org.apache.spark.api.java.JavaSparkContext sc, String inputPath, org.locationtech.jts.geom.GeometryFactory geometryFactory)
sc
- inputPath
- geometryFactory
- public static BoundBox readBoundBox(org.apache.spark.api.java.JavaSparkContext sc, String inputPath)
public static List<String> readFieldNames(org.apache.spark.api.java.JavaSparkContext sc, String inputPath) throws IOException
sc
- Spark ContextinputPath
- folder which contains shape file with dbf metadata fileIOException
public static PolygonRDD readToPolygonRDD(org.apache.spark.api.java.JavaSparkContext sc, String inputPath)
sc
- inputPath
- public static PolygonRDD readToPolygonRDD(org.apache.spark.api.java.JavaSparkContext sc, String inputPath, org.locationtech.jts.geom.GeometryFactory geometryFactory)
sc
- inputPath
- geometryFactory
- public static PolygonRDD geometryToPolygon(SpatialRDD geometryRDD)
geometryRDD
- public static PointRDD readToPointRDD(org.apache.spark.api.java.JavaSparkContext sc, String inputPath)
sc
- inputPath
- public static PointRDD readToPointRDD(org.apache.spark.api.java.JavaSparkContext sc, String inputPath, org.locationtech.jts.geom.GeometryFactory geometryFactory)
sc
- inputPath
- geometryFactory
- public static PointRDD geometryToPoint(SpatialRDD geometryRDD)
geometryRDD
- public static LineStringRDD readToLineStringRDD(org.apache.spark.api.java.JavaSparkContext sc, String inputPath)
sc
- inputPath
- public static LineStringRDD readToLineStringRDD(org.apache.spark.api.java.JavaSparkContext sc, String inputPath, org.locationtech.jts.geom.GeometryFactory geometryFactory)
sc
- inputPath
- geometryFactory
- public static LineStringRDD geometryToLineString(SpatialRDD geometryRDD)
geometryRDD
- Copyright © 2023 The Apache Software Foundation. All rights reserved.