Questions tagged [apache-sedona]
22 questions
0
votes
1 answer
Pytest showing error if path to test is not specified
I have a conftest.py inside my tests/ folder which contains a fixture with a spark context as follows:
import pytest
from pyspark import SparkConf
from sedona.utils import SedonaKryoRegistrator, KryoSerializer
from sedona.register import…

Rorepio
- 332
- 1
- 4
- 16
0
votes
1 answer
Wrong computed azimut for geo coordinates using Apache Sedona in Spark
I am running a Spark application, using Apache Sedona.
I am trying to compute the bearing/azimuth between two coordinates, using following script:
import…

Christian Schou Jødal
- 53
- 1
- 6
0
votes
0 answers
Spark Java: how to register a UDAF function using the new Aggregator
I'm using Java and can register an UDF function, and it works:
UDF1 stGetUTMZone = new StGetUTMZone();
sparkSession.udf().register("ST_GetUTMZone", stGetUTMZone, DataTypes.StringType);
However, when I try registering an UDAF…

Glauber Dantas
- 1
- 1
0
votes
0 answers
How to register a new user-defined aggregate function with custom type encoder to use in Spark SQL?
I'm using Apache Sedona to work with GIS data in Spark. The GIS library used by Sedona (and on my app) is the JTS library.
I need to implement a user-defined aggregate function (UDAF, not UDF) in order to create a custom behavior of ST_Union_Aggr()…

Glauber Dantas
- 1
- 1
0
votes
0 answers
Sedona scala.matchError:null when calling ST_INTERSECTS
I have a cluster with the following setup:
Hadoop 3.3.4
Hive 3.1.3
Spark 3.3.0
Sedona 1.2.1
I am trying to write a script that will take data from two hive tables, construct geometry objects and use ST_intersection to join the two tables.
I am…

Karthik Sankaran
- 217
- 2
- 11
0
votes
1 answer
scala 2.12 + Spark 3 + sedona-sql-3.0_2.12
I'm trying to use sedona with scala and spark. Here is the build.sbt file:
ThisBuild / scalaVersion := "2.12.12"
libraryDependencies ++= Seq(
"org.apache.spark" % "spark-core_2.12" % "3.0.1",
"org.apache.spark" % "spark-sql_2.12" % "3.0.1",
…

IcePack
- 3
- 2
-1
votes
1 answer
Converting Apache Sedona SQL example to java
I am trying to convert the Apache Sedona examples code from scala to java, and I am stucked in the line 128 of the SQL example, which says:
assert(boundary.take(1)(0).get(0)==geometryFactory.createPolygon(coordinates))
I am trying to understand it…

Dennis Savio
- 11
- 2