JimShady commented on issue #1531:
URL: https://github.com/apache/sedona/issues/1531#issuecomment-2259257164

   I did this:
   
   ```
   import os
   from pathlib import Path
   from pyspark.sql.types import StringType
   
   from sedona.spark import *
   
   sedona = 
SedonaContext.builder().config("spark.databricks.unityCatalog.volumes.enabled","true").getOrCreate()
   
   sc = sedona.sparkContext
   ```
   
   Then this
   
   ```
   ShapefileReader.readToGeometryRDD(sc, 
"dbfs:/Volumes/gc_prod_sandbox/su_james_d_smith/volume/geounit_tests/Albania 
2-digit postcode areas 2023.shp")
   ```
   
   But I get this error:
   
   ```
   TypeError: 'JavaPackage' object is not callable
   ---------------------------------------------------------------------------
   TypeError                                 Traceback (most recent call last)
   File <command-3459905630890875>, line 1
   ----> 1 ShapefileReader.readToGeometryRDD(sc, 
"dbfs:/Volumes/prod_sandbox/su_jim/volume/tests/Albania 2-digit postcode areas 
2023.shp")
   
   File 
/databricks/python/lib/python3.10/site-packages/sedona/core/formatMapper/shapefileParser/shape_file_reader.py:40,
 in ShapefileReader.readToGeometryRDD(cls, sc, inputPath)
        38 jvm = sc._jvm
        39 jsc = sc._jsc
   ---> 40 srdd = jvm.ShapefileReader.readToGeometryRDD(
        41     jsc,
        42     inputPath
        43 )
        44 spatial_rdd = SpatialRDD(sc=sc)
        46 spatial_rdd.set_srdd(srdd)
   
   TypeError: 'JavaPackage' object is not callable
   ```


-- 
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]

Reply via email to