This is an automated email from the ASF dual-hosted git repository.

jiayu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-sedona.git


The following commit(s) were added to refs/heads/master by this push:
     new 71ce823  Add Geotools MVN coordinates in python doc and jupyter 
notebooks
71ce823 is described below

commit 71ce8230b3cda68e5c5813121c115e873dbade04
Author: Jia Yu <[email protected]>
AuthorDate: Wed Feb 10 03:12:21 2021 -0800

    Add Geotools MVN coordinates in python doc and jupyter notebooks
---
 docs/download/overview.md     | 22 ++++++++++++++--------
 python/ApacheSedonaCore.ipynb |  2 ++
 python/ApacheSedonaSQL.ipynb  |  2 ++
 3 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/docs/download/overview.md b/docs/download/overview.md
index 1eab2a1..2b4d656 100644
--- a/docs/download/overview.md
+++ b/docs/download/overview.md
@@ -75,17 +75,23 @@ You can get it using one of the following methods:
 2. Download from [GitHub 
release](https://github.com/apache/incubator-sedona/releases) and copy it to 
SPARK_HOME/jars/ folder
 3. Call the [Maven Central 
coordinate](../GeoSpark-All-Modules-Maven-Central-Coordinates) in your python 
program. For example, in PySparkSQL
 ```python
-    spark = SparkSession.\
-        builder.\
-        appName('appName').\
-        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.0.0-incubating').\
-        getOrCreate()
+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()
 ```
 
 !!!warning
-       If you are going to use Sedona CRS transformation and ShapefileReader 
functions, you have to use Method 1. Because these functions internally use 
GeoTools libraries which are under LGPL license, Apache Sedona binary release 
cannot include them.
+       If you are going to use Sedona CRS transformation and ShapefileReader 
functions, you have to use Method 1 or 3. Because these functions internally 
use GeoTools libraries which are under LGPL license, Apache Sedona binary 
release cannot include them.
 
 ### Setup environment variables
 
diff --git a/python/ApacheSedonaCore.ipynb b/python/ApacheSedonaCore.ipynb
index 699831e..8068b00 100644
--- a/python/ApacheSedonaCore.ipynb
+++ b/python/ApacheSedonaCore.ipynb
@@ -53,6 +53,8 @@
     "    appName(\"Sedona App\").\\\n",
     "    config(\"spark.serializer\", KryoSerializer.getName).\\\n",
     "    config(\"spark.kryo.registrator\", SedonaKryoRegistrator.getName) 
.\\\n",
+    "    config(\"spark.jars.repositories\", 
\"https://repo.osgeo.org/repository/release,https://download.java.net/maven/2\";)
 .\\\n",
+    "    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\")
 .\\\n",
     "    getOrCreate()"
    ]
   },
diff --git a/python/ApacheSedonaSQL.ipynb b/python/ApacheSedonaSQL.ipynb
index 8d68a2c..555d836 100644
--- a/python/ApacheSedonaSQL.ipynb
+++ b/python/ApacheSedonaSQL.ipynb
@@ -26,6 +26,8 @@
     "        appName(\"TestApp\").\\\n",
     "        config(\"spark.serializer\", KryoSerializer.getName).\\\n",
     "        config(\"spark.kryo.registrator\", SedonaKryoRegistrator.getName) 
.\\\n",
+    "        config(\"spark.jars.repositories\", 
\"https://repo.osgeo.org/repository/release,https://download.java.net/maven/2\";)
 .\\\n",
+    "        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\")
 .\\\n",
     "        getOrCreate()"
    ]
   },

Reply via email to