object StructuredAdapter
Adapter for converting between DataFrame and SpatialRDD. It provides methods to convert DataFrame to SpatialRDD and vice versa without losing schema. It is different from org.apache.sedona.sql.utils.Adapter which loses the schema information during conversion. This should be used if your data starts as a DataFrame and you want to convert it to SpatialRDD
- Alphabetic
- By Inheritance
- StructuredAdapter
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val logger: Logger
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toDf(spatialPairRDD: JavaPairRDD[Geometry, Geometry], originalLeftSpatialRdd: SpatialRDD[Geometry], originalRightSpatialRdd: SpatialRDD[Geometry], sparkSession: SparkSession): DataFrame
Convert JavaPairRDD[Geometry, Geometry] to DataFrame This method is useful when you want to convert the result of spatial join to DataFrame.
Convert JavaPairRDD[Geometry, Geometry] to DataFrame This method is useful when you want to convert the result of spatial join to DataFrame.
- spatialPairRDD
The JavaPairRDD to convert.
- originalLeftSpatialRdd
The original left SpatialRDD involved in the join. It is used to get the schema of the left side.
- originalRightSpatialRdd
The original right SpatialRDD involved in the join. It is used to get the schema of the right side.
-
def
toDf(spatialPairRDD: JavaPairRDD[Geometry, Geometry], leftSchema: StructType, rightSchema: StructType, sparkSession: SparkSession): DataFrame
Convert JavaPairRDD[Geometry, Geometry] to DataFrame This method is useful when you want to convert the result of spatial join to DataFrame.
Convert JavaPairRDD[Geometry, Geometry] to DataFrame This method is useful when you want to convert the result of spatial join to DataFrame.
- spatialPairRDD
The JavaPairRDD to convert.
- leftSchema
The schema of the left side.
- rightSchema
The schema of the right side.
-
def
toDf(spatialPairRDD: JavaPairRDD[Geometry, Geometry], leftSchemaJson: String, rightSchemaJson: String, sparkSession: SparkSession): DataFrame
Convert JavaPairRDD[Geometry, Geometry] to DataFrame This method is useful when you want to convert the result of spatial join to DataFrame.
Convert JavaPairRDD[Geometry, Geometry] to DataFrame This method is useful when you want to convert the result of spatial join to DataFrame.
- spatialPairRDD
The JavaPairRDD to convert.
- leftSchemaJson
Schema of the left side. In a json format.
- rightSchemaJson
Schema of the right side. In a json format.
-
def
toDf(spatialRDD: SpatialRDD[Geometry], sparkSession: SparkSession): DataFrame
Convert SpatialRDD.rawSpatialRdd to DataFrame
Convert SpatialRDD.rawSpatialRdd to DataFrame
- spatialRDD
The SpatialRDD to convert. It must have rawSpatialRDD set.
-
def
toRowRdd(spatialRDD: SpatialRDD[Geometry]): RDD[Row]
Convert SpatialRDD to RDD[Row].
Convert SpatialRDD to RDD[Row]. It extracts Row from user data of Geometry.
-
def
toSpatialPartitionedDf(spatialRDD: SpatialRDD[Geometry], sparkSession: SparkSession): DataFrame
Convert SpatialRDD.spatialPartitionedRDD to DataFrame This is useful when you want to convert SpatialRDD after spatial partitioning.
Convert SpatialRDD.spatialPartitionedRDD to DataFrame This is useful when you want to convert SpatialRDD after spatial partitioning.
- spatialRDD
The SpatialRDD to convert. It must have spatialPartitionedRDD set. You must call spatialPartitioning method before calling this method.
-
def
toSpatialRdd(dataFrame: DataFrame): SpatialRDD[Geometry]
Convert DataFrame to SpatialRDD.
Convert DataFrame to SpatialRDD. It puts InternalRow as user data of Geometry. It auto-detects geometry column if geometryFieldName is not provided. It uses the first geometry column in DataFrame.
-
def
toSpatialRdd(rdd: RDD[InternalRow], schema: StructType, geometryFieldName: String): SpatialRDD[Geometry]
Convert RDD[InternalRow] to SpatialRDD.
Convert RDD[InternalRow] to SpatialRDD. It puts InternalRow as user data of Geometry.
-
def
toSpatialRdd(dataFrame: DataFrame, geometryFieldName: String): SpatialRDD[Geometry]
Convert DataFrame to SpatialRDD.
Convert DataFrame to SpatialRDD. It puts InternalRow as user data of Geometry.
-
def
toSpatialRdd(rdd: RDD[Row]): SpatialRDD[Geometry]
Convert RDD[Row] to SpatialRDD.
Convert RDD[Row] to SpatialRDD. It puts Row as user data of Geometry. It auto-detects geometry column if geometryFieldName is not provided. It uses the first geometry column in RDD.
-
def
toSpatialRdd(rdd: RDD[Row], geometryFieldName: String): SpatialRDD[Geometry]
Convert RDD[Row] to SpatialRDD.
Convert RDD[Row] to SpatialRDD. It puts Row as user data of Geometry.
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()