Setting up the 52°North WPS with GRASS backend under Windows and Apache Tomcat

ALERT! For the Linux tutorial see TutorialBackendWpsGRASSLinux.

Prerequisites

From WPS version 3.3.0, you will need to have added the GeoTools package to the WPS. You can find it in the download area.

(It is assumed that Java 1.7 and Apache Tomcat are already installed. Other servlet container should work as well.)

  1. Download the latest WPS release from here.(If you want the source code, follow this tutorial)
  2. Rename the downloaded .war file to wps.war and drop it in the webapps folder of your tomcat.
  3. Download the GRASS 7.0 installer from here.(You could as well download the latest nightly build e.g. from here. There is no guarantee that the nightly builds work stable with the 52°North WPS however.)
  4. Install GRASS 7.0 with the downloaded installer
  5. Open the file .grassrc70 in the directory <GRASS_INSTALL_PATH>\demolocation. Change the GISDBASE parameter to the path of your GRASS installation e.g. GISDBASE: C:/Programme/GRASS-70-SVN (use slashes instead of backslashes).
  6. Download and unzip the wps-grass-bridge from here or check it out from the svn located here. ALERT! Note that the GRASS backend currently doesn not work with the trunk version of the bridge.
  7. Download and install Python.While the python executable is shipped with GRASS 7.0, the GrassModuleStarter needs some extra libraries. Thus a complete installation of python is needed.
  8. Start your Apache Tomcat
  9. Go to http://localhost:<tomcat_port>/wps/webAdmin/index.jsp Username: wps Password: wps
    • Activate the tab <Server Settings>
      • Click on the edit button and change the port , if necessary
      • Click on the edit button and change the port , if necessary
    • Activate the tab <Algorithm Repositories>
      • enable the Grass Repository
      • Click on the edit button and set the variables
        • Grass_Home must point to the installation directory of GRASS 7.0
        • Python_Home must point to a directory that contains the python executable (e.g. the extrabin directory of the GRASS 7.0 installation or the path to the python installation (see step 7.))
        • Python_Path must point to a directory that contains the python installation.
        • Addon_Dir (optional) must point to a directory that contains the GRASS addons (python scripts and .exe files with the same name).
        • The ModuleStarter_Home variable must point to the subdirectory of the wps-grass-bridge that contains the file GrassModuleStarter.py.
        • GISRC_Dir must point to the .grassrc70 file. The parent directory must also contain the PERMANENT directory. This will be automatically created when installing GRASS 7.0, so unless you know what you are doing put <GRASS_INSTALL_PATH>\demolocation\.grassrc70 here. See also step 5.
        • TMP_Dir must point to a directory that is not read-only. Note: every time the WPS with enabled GRASS-backend is started it will attempt to delete all files in the tmp directory, so do not point to a directory that contains any important files!
        • All Grass processes that will be exposed as WPS processes are listed as algorithm-properties of this repository. Here you can add, remove, activate and deactivate Grass processes according to your needs.
    • The username and password for the WPS Admin Console can be changed in the file _TOMCAT_INSTALL_PATH_\webapps\wps\WEB-INF\classes\users.xml
Example configuration:
grass_settings_windows_cropped.png

Input/output types supported by the GRASS 7 backend

At the moment the following input and output types are supported by the 52°North GRASS-WPS backend:

Raster

Mimetype Input Output
image/tiff Yes Yes
image/geotiff Yes Yes
application/geotiff Yes Yes
application/x-geotiff Yes Yes
image/png Yes Yes
image/gif Yes Yes
image/jpeg Yes Yes
application/x-erdas-hfa Yes Yes
application/netcdf Yes Yes
application/x-netcdf Yes Yes

Vector

Mimetype Schema Input Output
text/xml http://schemas.opengis.net/gml/2.1.2/feature.xsd Yes Yes
text/xml http://schemas.opengis.net/gml/3.1.1/base/gml.xsd Yes Yes
application/vnd.google-earth.kml+xml http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd Yes Yes
application/dgn - Yes No
application/shp - Yes No
application/x-zipped-shp - Yes Yes
Topic revision: r9 - 26 Feb 2015, benjaminpross
Legal Notice | Privacy Statement


This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Wiki? Send feedback