All Projects → geotrellis → geotrellis-server

geotrellis / geotrellis-server

Licence: Apache-2.0 license
Tools for building raster processing and display services

Programming Languages

scala
5932 projects
shell
77523 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
Makefile
30231 projects
CSS
56736 projects

Projects that are alternatives of or similar to geotrellis-server

deegree3
Official deegree repository providing geospatial core libraries, data access and advanced OGC web service implementations
Stars: ✭ 118 (+81.54%)
Mutual labels:  wms, wcs, ogc, wmts
tile-map-service-net5
Tile server for .NET 5 platform with MBTiles, Filesystem, GeoTIFF, HTTP sources and XYZ, TMS, WMTS, WMS endpoints (protocols support)
Stars: ✭ 45 (-30.77%)
Mutual labels:  wms, tms, ogc, wmts
mapmint
Fast and easy webmapping.
Stars: ✭ 51 (-21.54%)
Mutual labels:  wms, wcs, ogc, wmts
tailormap
B3partners Tailormap repository
Stars: ✭ 26 (-60%)
Mutual labels:  wms, tms, ogc, wmts
krawler
A minimalist (geospatial) ETL
Stars: ✭ 51 (-21.54%)
Mutual labels:  wms, wcs, ogc
mapserver-docker
Mapserver OGR GDAL PostGIS WMS WCS WFS with Lighttpd in Docker
Stars: ✭ 18 (-72.31%)
Mutual labels:  wms, wcs, ogc
GPXSee-maps
GPXSee maps
Stars: ✭ 27 (-58.46%)
Mutual labels:  wms, tms, wmts
rok4
ROK4 est une suite d'outils open source développée par l'IGN France permettant la diffusion de données raster et vecteur en WMS, WMTS ou TMS. DEPRECATED ! Projet maintenu ici : https://github.com/rok4/documentation
Stars: ✭ 18 (-72.31%)
Mutual labels:  wms, ogc, wmts
maml
Map Algebra Modeling Language: It's what we and whales are.
Stars: ✭ 17 (-73.85%)
Mutual labels:  geotrellis, map-algebra
wms
WMS/WMTS server for Node.js
Stars: ✭ 60 (-7.69%)
Mutual labels:  wms, wmts
gsky
Distributed Scalable Geospatial Data Server
Stars: ✭ 23 (-64.62%)
Mutual labels:  wms, wcs
py-qgis-server
QGIS embbeded WMS/WFS/WCS asynchronous scalable http server
Stars: ✭ 28 (-56.92%)
Mutual labels:  wms, wcs
Geoserver
Official GeoServer repository
Stars: ✭ 2,573 (+3858.46%)
Mutual labels:  wms, wcs
Editor Layer Index
A unified layer index for OSM editors.
Stars: ✭ 144 (+121.54%)
Mutual labels:  wms
Gm3
GeoMoose 3.0 Development. Please submit pull requests to the 'main' branch.
Stars: ✭ 39 (-40%)
Mutual labels:  wms
Zstore
Программа для складского учета с веб интерфейсом
Stars: ✭ 32 (-50.77%)
Mutual labels:  wms
Terriajs
A library for building rich, web-based geospatial data platforms.
Stars: ✭ 699 (+975.38%)
Mutual labels:  wms
Mapserver
Source code of the MapServer project. Please submit pull requests to the 'main' branch.
Stars: ✭ 693 (+966.15%)
Mutual labels:  wms
tensorflow-maml
TensorFlow 2.0 implementation of MAML.
Stars: ✭ 79 (+21.54%)
Mutual labels:  maml
Itowns
A Three.js-based framework written in Javascript/WebGL for visualizing 3D geospatial data
Stars: ✭ 517 (+695.38%)
Mutual labels:  wms

GeoTrellis Server

CircleCI Join the chat at https://gitter.im/geotrellis/geotrellis Maven Central Snapshots

GeoTrellis Server is a set of components designed to simplify viewing, processing, and serving raster data from arbitrary sources with an emphasis on doing so in a functional style. It aims to ease the pains related to constructing complex raster processing workflows which result in TMS-based (z, x, y) and extent-based products.

In addition to providing a story about how sources of imagery can be displayed or returned, this project aims to simplify the creation of dynamic, responsive layers whose transformations can be described in MAML (Map Algebra Modeling Language).

Getting Started with GeoTrellis Server

GeoTrellis Server is currently available for Scala 2.12.

To get started with SBT, simply add the following to your build.sbt file:

libraryDependencies += "com.azavea.geotrellis" %% "geotrellis-server-core" % "<latest version>"

High level concepts

Imagine you've got a simple case class which is sufficient to identify layers of imagery for an application you're working on.

import java.net.URI

case class ImageryLayer(location: URI)

Imagine further that you'd like to enable your application to compose these layers together via map algebra to produce derived layers and that the combinations can't be known at compile-time (users will be deciding which - if any - map algebra to run). This is a job that GeoTrellis server can radically simplify. Because we're dealing with behavior specified at runtime, we need to evaluate program descriptions rather than simple, first-order parameters - the task for which MAML was written.

// This node describes a `LocalAdd` on the values eventually
// bound to `RasterVar("test1")` and `RasterVar("test2")
val simpleAdd = Addition(List(RasterVar("test1"), RasterVar("test2")))

// This describes incrementing every value in the eventually bound raster by 1
val plusOne = Addition(List(RasterVar("additionRaster1"), IntLit(1)))

Because MAML encodes map alagebra transformations in data, actually executing a MAML program for practical purposes can be difficult and unintuitive. GeoTrellis server bridges this gap by providing a typeclass-based means of extending source types in client applications with the behaviors necessary to actually evaluate a MAML AST.

The following example demonstrates what is required to generate functions which produce extents provided MAML program descriptions. For a more complete example, check out CogNode.

import io.circe._
import io.circe.syntax._
import io.circe.generic.semiauto._
import cats._
import cats.effect._
import com.azavea.maml.ast._
import com.azavea.maml.eval.BufferingInterpreter
import geotrellis.server._

// This class points to a COG and specifies a band of interest
case class RasterRef(uri: URI, band: Int)

// We need to provide some implicit evidence. Most applications can do this within companion objects
object RasterRef {
  // reification means 'thingification', and that's what we're proving we can do here
  implicit val rasterRefExtentReification: ExtentReification[RasterRef] = new ExtentReification[RasterRef] {
    def extentReification(self: CogNode, buffer: Int)(implicit contextShift: ContextShift[IO]): (Extent, CellSize) => IO[Literal] = ???
  }
  // We can lean on circe's automatic derivation to provide an encoder
  implicit val rasterRefEncoding: Encoder[RasterRef] = deriveEncoder[RasterRef]
}

// A source from which MAML evaluation will be able to derive necessary artifacts
val reference = RasterRef("http://some.url.com", 1)

// We need to key provided references based on the ID of the Var they'll replace
val parameters = Map("additionRaster1" -> reference)

// This is an interpeter GT Server will use to roll up the tree + params to some result
val interpreter = BufferingInterpreter.DEFAULT

// Not yet a result: we can use the result here to produce artifacts for different extent inputs
val tileEval = LayerExtent.apply(IO.pure(plusOne), IO.pure(parameters), interpreter)

val targetExtent: Extent = ??? // Where should the tile come from?
val targetCellSize: CellSize = ??? // What resolution should the tile be?

// Branch on Valid/Invalid and print some info about which branch we're on
tileEval(targetExtent, targetCellSize) map {
  case Valid(tile) =>
    println("we did it, a tile: (rows: ${tile.rows}, cols: ${tile.cols})")
  case Invalid(err) =>
    println("Ran into an error (${err.asJson}) during MAML evaluation of AST (${plusOne.asJson}) with params (${params.asJson})")
}

LayerExtent is joined by two other objects which organize evaluation strategies for different products:

  • LayerExtent: Constructs functions that produce a cats.data.Validated instance containing a Tile (given an extent) or else MamlErrors. Requires ExtentReification and Encoder evidence

  • LayerTms: Constructs functions that produce a cats.data.Validated instance containing a Tile (given the tms Z, X, Y coordinates) or else MamlErrors. Requires TmsReification and Encoder evidence

  • LayerHistogram: Constructs functions that produce a cats.data.Validated instance containing a Histogram or else MamlErrors. Requires ExtentReification, Encoder, and HasRasterExtents evidence

Each of these objects is a response to distinct needs encountered when writing raster-based applications. Included in each object are methods which encode several strategies for evaluating their products. The strategies currently available are:

  • apply: Takes parameters, a MAML AST, and a MAML Interpreter and evaluates accordingly

  • generateExpression: parameters, a function which will generate an AST based on the parameters, and a MAML Interpreter

  • curried: Takes an AST and a MAML Interpreter (this method produces an intermediate, curried, function which expects a parameter map to evaluate)

  • identity: Evaluates a proven source without any MAML evaluation (useful for quickly defining a static layer viewer or debugging implicit evidence behavior

Running an example

Three example servers are available which can be run through the provided makefile. These examples have been implemented via http4s, which has a pleasant, clean API and plays nicely with the cats and cats-effect libraries.

  1. A server and simple UI that evaluates weighted overlays between arbitrary COGs. This demo includes a simple UI, available at http://localhost:9000/ for a
./scripts/server --overlay
  1. Integrates GTServer components with application-specific persistence needs.
./scripts/server --persistence
  1. Illustrates GTServer evaluating a remote-sensing classic, the NDVI.
./scripts/server --ndvi
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].