Geoserver 3-D Model Scene Exporter

geoserver-exportscene-plugin-screenshot

As the capabilities of modern GIS systems increase so too does the demand for these GIS system to provide rich and flexible methods to interact with the data. A vital application of modern GIS data is its use within 3D visualization frameworks which allows the end user a more intuitive and accurate representation of geospatial data.

To date a majority of true 3D visualization solutions for interacting with geospatial data has been limited to thick desktop clients such as Google Earth or heavy web plugins such as NASA World Wind. However, with existence of open standards, the increasing support for WebGL, and modern frameworks targeting there technologies there is no reason why such visualization need be limited to legacy clients. As an example which embraces this crossroad between modern technologies and open standards Geocent is happy to release the fully open sourced Geoserver 3-D Model Scene Exporter.

This plugin exposes a reference Web Processing Service to export raster elevation data from Geoserver to several interactive 3D formats. Currently supported export formats for the plugin include:

  • COLLADA – An open standard XML format for exchanging digital assets managed by the Khronos Group.
  • CubicVR.js Mesh JSON – Included as a reference implementation to demonstrate integrating the plugin with existing open source WebGL frameworks such as CubicVR.js.

The plugin is developed as a Maven project allowing for integration with external libraries or plugins with minimal effort. Furthermore, the current status of the plugin utilizes only existing functionality included within Geoserver allowing for immediate deployment without the need for additional libraries.

Functionality

The plugin utilizes the Geotools and JTS libraries upon which Geoserver is built to create a Web Processing Service which functions as follows:

geoserver-exportscene-plugin-workflow

  1. The exposed WPS interface (gs:ExportScene) accepts a Geotools GridCoverage2D data object. (Note: Although this input may be represented by a data store the actual input should be a subsection of the larger data object such as a chained response from the gs:CropCoverage WPS).
  2. The interface converts the raster data to a JTS Coordinate list.
  3. The QuadEdgeSubdivion mesh representation for the Coordinate list is calculated utilizing the Delaunay Triangulation functionality within the JTS library.
  4. Depending on the requested output format MIME type the QuadEdgeSubdivion is traversed to generate the requested output data format using the implemented PPIO class for the related format.

Customization

Customization of the plugin with support for additional formats is designed to be a simple task for developers.

  1. Fork the project’s repository to your personal workspace.
  2. Create a new class which extends an appropriate base Geoserver PPIO class.
  3. Call the super constructor specifying SceneType.class for the externalType and internalType parameters. Additionally set the appropriate MIME type for which this class is related.
  4. Within the implemented PPIO class handle the incoming value object as a SceneType object.
  5. Fetch the list of faces for the generated mesh using the SceneType.getFaces() method and generate the required output format object.
  6. Add a bean reference for the newly created class to the applicationContext.xml file.
  7. Initiate a pull request to push the customization back into the project’s repository.

Project Information

Project Repository:

https://github.com/Geocent/geoserver-exportscene-plugin/

Project API Documentation:

http://geocent.github.com/geoserver-exportscene-plugin/javadoc/

Live Demonstration (requires access to a Geoserver with both the extension installed and CORS enabled):

http://geocent.github.com/geoserver-exportscene-plugin/demo/

Tagged with:
Posted in Our Projects