Setup for Raster Processing in ArcGIS Pro#
The BDT raster processors require additional libararies not included with the BDT jar. This guide describes how to pull these libraries into your environment.
For spark to properly install the required libraries, an ivySettings.xml file must be provided. See the snippet below for what this file should look like. Save this file to an easily accessible place on your machine.
<ivysettings>
<settings defaultResolver="chain"/>
<resolvers>
<chain name="chain">
<ibiblio name="osgeo" m2compatible="true" root="https://repo.osgeo.org/repository/release" />
<ibiblio name="central" m2compatible="true" root="https://repo1.maven.org/maven2/" />
</chain>
</resolvers>
</ivysettings>
Next, insert a cell into your notebook and paste the following code.
from spark_esri import spark_start, spark_stop
spark_stop()
config = {
"spark.driver.memory":"4G",
"spark.kryoserializer.buffer.max":"2024",
"spark.jars": "C:\\Users\\%USERNAME%\\bdt3\\bdt-3.3.0-3.5.1-2.12.jar",
"spark.submit.pyFiles": "C:\\Users\\%USERNAME%\\bdt-3.3.0.zip",
"spark.jars.packages": "org.geotools:gt-main:24.6,org.geotools:gt-geotiff:24.6,org.geotools:gt-epsg-hsql:24.6",
"spark.jars.excludes": "org.scala-lang:scala-reflect,com.fasterxml.jackson.core:jackson-core",
"spark.jars.ivySettings": "file:///<path-to-ivySettings.xml>"
}
spark = spark_start(config=config)
Adjust the path to the jar, zip, and ivySettings files to match where they are on your machine.
NOTE: The file paths in the above cell must use double backslashes. Or insert an “r” before the string, e.g., r"C:\Users\%USERNAME%\bdt3\bdt-3.3.0-3.5.1-2.12.jar"
.