Uploaded image for project: 'Apache Sedona'
  1. Apache Sedona
  2. SEDONA-16

Use a GeoTools Maven Central wrapper to fix failed Jupyter notebook examples

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0.1

    Description

      Currently, GeoTools libraries are used in Sedona ShapefileReader and CRS transformation. These are optional features.

       

      GeoTools lib are put on OSGEO maven repo, not on Maven Central.  This leads to two issues

      1. Some cloud environments do not allow additional maven repo. Only Maven Central is allowed.
      2. GeoTools internally depends on javax-media:jai-core 1.1.3. jai-core is not available on Maven Central but on OSGEO and others repo. However, jai-core's POM.xml file is on Maven Central. This misleads many environments to Maven Central and stops there. For example, this method in Sedona Jupyter notebook example does not work because of "jai-core not found" issue.

      spark = SparkSession. \

      builder. \

      appName('appName'). \

      config("spark.serializer", KryoSerializer.getName). \

      config("spark.kryo.registrator", SedonaKryoRegistrator.getName). \

      config("spark.jars.repositories", 'https://repo.osgeo.org/repository/release,' 'https://download.java.net/maven/2'). \ config('spark.jars.packages', 'org.apache.sedona:sedona-python-adapter-3.0_2.12:1.0.0-incubating,'

      'org.geotools:gt-main:24.0,'

      'org.geotools:gt-referencing:24.0,'

      'org.geotools:gt-epsg-hsql:24.0'). \

      getOrCreate()

      To fix these two issues, I have created a Geotools wrapper[1] to move GeoTools to Maven Central. GeoTools is LGPL so I think this is OK. Please see my PR.

       

      [1]https://github.com/jiayuasu/geotools-wrapper

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jiayu Jia Yu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: