public class SpatialRDD<T extends org.locationtech.jts.geom.Geometry> extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
long |
approximateTotalCount
The total number of records.
|
org.locationtech.jts.geom.Envelope |
boundaryEnvelope
The boundary envelope.
|
protected boolean |
CRStransformation
The CR stransformation.
|
List<String> |
fieldNames |
org.apache.spark.api.java.JavaRDD<org.locationtech.jts.index.SpatialIndex> |
indexedRawRDD
The indexed raw RDD.
|
org.apache.spark.api.java.JavaRDD<org.locationtech.jts.index.SpatialIndex> |
indexedRDD
The indexed RDD.
|
org.apache.spark.api.java.JavaRDD<T> |
rawSpatialRDD
The raw spatial RDD.
|
protected String |
sourceEpsgCode
The source epsg code.
|
org.apache.spark.api.java.JavaRDD<T> |
spatialPartitionedRDD
The spatial partitioned RDD.
|
protected String |
targetEpgsgCode
The target epgsg code.
|
Constructor and Description |
---|
SpatialRDD() |
Modifier and Type | Method and Description |
---|---|
boolean |
analyze()
Analyze.
|
boolean |
analyze(org.locationtech.jts.geom.Envelope datasetBoundary,
Integer approximateTotalCount) |
boolean |
analyze(org.apache.spark.storage.StorageLevel newLevel)
Analyze.
|
org.locationtech.jts.geom.Envelope |
boundary()
Deprecated.
Call analyze() instead
|
void |
buildIndex(IndexType indexType,
boolean buildIndexOnSpatialPartitionedRDD)
Builds the index.
|
void |
calc_partitioner(GridType gridType,
int numPartitions)
Spatial partitioning.
|
long |
countWithoutDuplicates()
Count without duplicates.
|
long |
countWithoutDuplicatesSPRDD()
Count without duplicates SPRDD.
|
boolean |
CRSTransform(String sourceEpsgCRSCode,
String targetEpsgCRSCode)
CRS transform.
|
boolean |
CRSTransform(String sourceEpsgCRSCode,
String targetEpsgCRSCode,
boolean lenient)
CRS transform.
|
void |
flipCoordinates() |
boolean |
getCRStransformation()
Gets the CR stransformation.
|
SpatialPartitioner |
getPartitioner() |
org.apache.spark.api.java.JavaRDD<T> |
getRawSpatialRDD()
Gets the raw spatial RDD.
|
int |
getSampleNumber() |
String |
getSourceEpsgCode()
Gets the source epsg code.
|
String |
getTargetEpgsgCode()
Gets the target epgsg code.
|
RectangleRDD |
MinimumBoundingRectangle()
Deprecated.
|
void |
saveAsGeoJSON(String outputLocation)
Save as geo JSON.
|
void |
saveAsWKB(String outputLocation)
Save as WKB.
|
void |
saveAsWKT(String outputLocation)
Save as WKT
|
void |
setRawSpatialRDD(org.apache.spark.api.java.JavaRDD<T> rawSpatialRDD)
Sets the raw spatial RDD.
|
void |
setSampleNumber(int sampleNumber)
Sets the sample number.
|
boolean |
spatialPartitioning(GridType gridType) |
void |
spatialPartitioning(GridType gridType,
int numPartitions) |
boolean |
spatialPartitioning(List<org.locationtech.jts.geom.Envelope> otherGrids)
Deprecated.
Use spatialPartitioning(SpatialPartitioner partitioner)
|
void |
spatialPartitioning(SpatialPartitioner partitioner) |
boolean |
spatialPartitioning(StandardQuadTree partitionTree)
Deprecated.
Use spatialPartitioning(SpatialPartitioner partitioner)
|
public long approximateTotalCount
public org.locationtech.jts.geom.Envelope boundaryEnvelope
public org.apache.spark.api.java.JavaRDD<T extends org.locationtech.jts.geom.Geometry> spatialPartitionedRDD
public org.apache.spark.api.java.JavaRDD<org.locationtech.jts.index.SpatialIndex> indexedRDD
public org.apache.spark.api.java.JavaRDD<org.locationtech.jts.index.SpatialIndex> indexedRawRDD
public org.apache.spark.api.java.JavaRDD<T extends org.locationtech.jts.geom.Geometry> rawSpatialRDD
protected boolean CRStransformation
protected String sourceEpsgCode
protected String targetEpgsgCode
public int getSampleNumber()
public void setSampleNumber(int sampleNumber)
sampleNumber
- the new sample numberpublic boolean CRSTransform(String sourceEpsgCRSCode, String targetEpsgCRSCode, boolean lenient)
sourceEpsgCRSCode
- the source epsg CRS codetargetEpsgCRSCode
- the target epsg CRS codelenient
- consider the difference of the geodetic datum between the two coordinate systems,
if true
, never throw an exception "Bursa-Wolf Parameters Required", but not
recommended for careful analysis workpublic boolean CRSTransform(String sourceEpsgCRSCode, String targetEpsgCRSCode)
sourceEpsgCRSCode
- the source epsg CRS codetargetEpsgCRSCode
- the target epsg CRS codepublic boolean spatialPartitioning(GridType gridType) throws Exception
Exception
public void calc_partitioner(GridType gridType, int numPartitions) throws Exception
gridType
- the grid typeException
- the exceptionpublic void spatialPartitioning(GridType gridType, int numPartitions) throws Exception
Exception
public SpatialPartitioner getPartitioner()
public void spatialPartitioning(SpatialPartitioner partitioner)
public boolean spatialPartitioning(List<org.locationtech.jts.geom.Envelope> otherGrids) throws Exception
Exception
public boolean spatialPartitioning(StandardQuadTree partitionTree) throws Exception
Exception
public long countWithoutDuplicates()
public long countWithoutDuplicatesSPRDD()
public void buildIndex(IndexType indexType, boolean buildIndexOnSpatialPartitionedRDD) throws Exception
indexType
- the index typebuildIndexOnSpatialPartitionedRDD
- the build index on spatial partitioned RDDException
- the exceptionpublic org.locationtech.jts.geom.Envelope boundary()
public org.apache.spark.api.java.JavaRDD<T> getRawSpatialRDD()
public void setRawSpatialRDD(org.apache.spark.api.java.JavaRDD<T> rawSpatialRDD)
rawSpatialRDD
- the new raw spatial RDDpublic boolean analyze(org.apache.spark.storage.StorageLevel newLevel)
newLevel
- the new levelpublic boolean analyze()
public boolean analyze(org.locationtech.jts.geom.Envelope datasetBoundary, Integer approximateTotalCount)
public void saveAsWKB(String outputLocation)
outputLocation
- the output locationpublic void saveAsWKT(String outputLocation)
public void saveAsGeoJSON(String outputLocation)
outputLocation
- the output location@Deprecated public RectangleRDD MinimumBoundingRectangle()
public boolean getCRStransformation()
public String getSourceEpsgCode()
public String getTargetEpgsgCode()
public void flipCoordinates()
Copyright © 2023 The Apache Software Foundation. All rights reserved.