Search code examples
openlayers-3cesiumjs

Visualizing large amounts of spatial vector data using WebGL


I plan on doing an application that visualizes large 2d tiled images. The application needs to achieve the following:

  1. Additive blending of layers, i.e. somehow setting the blend equation of WebGL to be additive: gl.blendEquation(gl.FUNC_ADD).
  2. Colorization of black and white images (multiply by constant color, e.g. red. This would correspond to setting gl.blendColor(1, 0, 0, 1); and gl.blendFunc(gl.CONSTANT_COLOR, gl.ONE);).
  3. Drawing of large amounts of simple vector data (mostly polygons).
  4. Contrast/brightness/range of intensity manipulation

According to my research, the renderer should be WebGL based for these goals. I did an initial prototype using Openlayers 3. I managed to implement everything except (3) using the precompose and postcompose hooks and a custom shader for the range of intensity manipulation. I saw, however, that polygon rendering using WebGL is not supported yet and I haven't seen a recent update on this issue/state of the development. My question is if there is a possibility/some starting point to implement this myself or if something like cesium would be a better match for my needs.


Solution

  • I can't speak to the OpenLayers roadmap, but Cesium itself should be able to handle your requirements out of the box. Here's some examples (with code) showing the features you are looking for

    Additive blending of layers

    Polygons This is GeoJSON but we also handle KML, TopoJSON, CMZL and have a programattic API. We also handle a diverse set of geometry

    Imagery Adjustment

    If you decide to give Cesium a try, we have a very active forum that can help you get started, so don't hesitate to post any questions you have. cesiumjs.org also has plenty of additional info, help, and demos.