sebastienbourg opened a new issue, #752:
URL: https://github.com/apache/sedona/issues/752
## Expected behavior
Read shapefile with PolygonZ
## Actual behavior
Hello,
I'm trying to read a shapefile containing POLYGON Z in geometry column. I
used Python API and also tried with Scala API.
When using ShapefileReader.readToGeometryRDD(sc = spark,
inputPath='/path/to/shapefolder/')
It returns an empty rdd : rddp.countWithoutDuplicates() return 0
Also when using the Adapter to convert it to DadtaFrame it's still empty.
The metadata are well read perhaps.
When using geopandas it works fine but it take a lot of time.
## Steps to reproduce the problem
`import os
import geopandas as gpd
from pyspark.sql import SparkSession
from pyspark.sql.functions import col, expr, when
from sedona.register import SedonaRegistrator
from sedona.utils import SedonaKryoRegistrator, KryoSerializer
from sedona.core.formatMapper.shapefileParser import ShapefileReader
from sedona.utils.adapter import Adapter
from sedona.core.enums import GridType
from sedona.core.enums import IndexType
from sedona.core.spatialOperator import JoinQueryRaw
spark = SparkSession.builder.\
master("local[*]").\
appName("SedonaSQL-Example").\
config("spark.serializer", KryoSerializer.getName).\
config("spark.kryo.registrator", SedonaKryoRegistrator.getName) .\
config('spark.jars.packages',
'org.apache.sedona:sedona-python-adapter-3.0_2.12:1.3.1-incubating,'
'org.datasyslab:geotools-wrapper:1.1.0-25.2'). \
getOrCreate()
SedonaRegistrator.registerAll(spark)
sc = spark.sparkContext
rddp = ShapefileReader.readToGeometryRDD(sc = spark,
inputPath='/path/to/shapefolder/' )
rddp.countWithoutDuplicates()
rddp.rawSpatialRDD.count()
`
## Settings
Sedona version = 1.3.1
Apache Spark version = 3.3.0
API type = Python (Scala also)
Scala version =2.12
JRE version = 1.8
Python version = 3.9.5
Environment = Azure Databricks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]