Getting Started
GeoTrellis is a Scala library and framework that provides APIs for reading, writing and operating on geospatial raster and vector data. GeoTrellis also provides helpers for these same operations in Spark and for performing MapAlgebra operations on rasters. It is released under the Apache 2 License.
There are a number of geotrellis subpackages available. We recommend getting started with geotrellis-raster
:
libraryDependencies += "org.locationtech.geotrellis" %% "geotrellis-raster" % "3.2.1-SNAPSHOT"
Loading rasters via the RasterSource
API is easy once you've got geotrellis-raster
installed:
import geotrellis.raster._
val rs = RasterSource("gtiff+file://data/ls8_int32.tif")
// rs: RasterSource = geotrellis.raster.geotiff.GeoTiffRasterSource@45942d72
rs.extent
// res0: geotrellis.vector.Extent = Extent(
// 549585.0,
// 3263955.0,
// 564945.0,
// 3279315.0
// )