locationtech / rasterframes

Geospatial Raster support for Spark DataFrames
http://rasterframes.io
Apache License 2.0
243 stars 46 forks source link

Add steps to `create_rf_spark_context` to check for gdal #418

Open metasim opened 4 years ago

metasim commented 4 years ago

It would save end users headaches if we could check for gdal when create_rf_spark_context is called, confirm the version is compatible, and pass the library path to the JVM.

robknapen commented 4 years ago

Also, if gdal can not be found and it falls back to JVM geotiff reader, surface the warning (e.g. in the notebook) to alert users that reading other types of files will not work correctly.

In the console there is a message like WARN GDALRasterSource$: GDAL native bindings are not available. Falling back to JVM-based reader for GeoTIFF format. but that might be missed.

Unless these things are not related of course.

vpipkt commented 4 years ago

In the end did we have success with using java options to set the library path or am i mistaken?

robknapen commented 4 years ago

In my case it was solved by installing homebrew gdal on macOS. Setting the library did not help. Maybe for a future version?

metasim commented 4 years ago

Dependent upon geotrellis/gdal-warp-bindings build.

add'l context: https://gitter.im/geotrellis/geotrellis?at=5dcdbf95ea7d147cb37d438c

metasim commented 4 years ago

See also: https://github.com/geotrellis/gdal-warp-bindings/issues/73