Introduction

This tutorial shows you how to install a Sensor Things API (STA). To be able to install the 52°North STA the following software has to be downloaded and installed:

  • Java Runtime Enviroment (JRE) 8.0 or higher
  • Application server compatible to Java Servlet-API 2.5 or higher
  • Running database managment system

For Windows systems we provide a tutorial, how to setup the system for the installation of the STA. In the tutorial we use Apache Tomcat as the application server and PostgreSQL/ PostGIS as the database management system: Tutorial

Installing the Webapp

When your system matches the requirments above, download the package including the war-file: 52°North STA latest version

Unzip the package and browse to the folder UNZIPPED_PACKAGE/bin/target where the file 52n-sensorthings-webapp.war is located. Copy the file 52n-sensorthings-webapp.war into the folder TOMCAT_BASE/webapps. Make sure your Tomcat and PostgreSQL are running. After a moment the war-file gets converted and in the folder should be a new folder 52n-sensorthings-webapp. Next navigate in this new folder to the application.yml and open it with an editor (TOMCAT_BASE\webapps\52n-sensorthings-webapp\WEB-INF\classes). You need to adjust the following settings manually:

  • server -> rootURL: Used for response serialization + url parsing, external URL Must be set correctly!
  • server -> servlet -> context-path: The path of the running STA (name of the applet in the Apache Tomcat).
  • spring -> datasource: Connection information to the database
    • username: Database user name
    • password: Database user password
    • url: URL to the database (last value is the database name)
    • jpa -> properties -> hibernate -> hbm2ddl_ -> auto: If you use the STA together with the SOS, set the setting to none!

If this is the case than you can reach the webapp with this URL: http://localhost:8080/52n-sensorthings-webapp/

When you successfully reach the service the response should be a json document looking like this:

{
    "value": [
        {
            "name": "Datastreams",
            "url": "http://localhost:8080/52n-sensorthings-webapp/Datastreams"
        },
        {
            "name": "Observations",
            "url": "http://localhost:8080/52n-sensorthings-webapp/Observations"
        },
        {
            "name": "Things",
            "url": "http://localhost:8080/52n-sensorthings-webapp/Things"
        },
        {
            "name": "Locations",
            "url": "http://localhost:8080/52n-sensorthings-webapp/Locations"
        },
        {
            "name": "HistoricalLocations",
            "url": "http://localhost:8080/52n-sensorthings-webapp/HistoricalLocations"
        },
        {
            "name": "Sensors",
            "url": "http://localhost:8080/52n-sensorthings-webapp/Sensors"
        },
        {
            "name": "ObservedProperties",
            "url": "http://localhost:8080/52n-sensorthings-webapp/ObservedProperties"
        },
        {
            "name": "FeaturesOfInterest",
            "url": "http://localhost:8080/52n-sensorthings-webapp/FeaturesOfInterest"
        }
    ],
    "serverSettings": {
        "conformance": [
            "http://www.opengis.net/spec/iot_sensing/1.1/req/datamodel",
            "http://www.opengis.net/spec/iot_sensing/1.1/req/resource-path/resource-path-to-entities",
            "http://www.opengis.net/spec/iot_sensing/1.1/req/request-data",
            "http://www.opengis.net/spec/iot_sensing/1.1/req/create-update-delete",
            "https://github.com/52North/sensorweb-server-sta/extension/server-properties.md",
            "https://github.com/52North/sensorweb-server-sta/extension/server-version.md"
        ],
        "https://github.com/52North/sensorweb-server-sta/extension/server-properties.md": {
            "escapeId": true,
            "implicitExpand": false,
            "updateFOI": false,
            "variableEncodingType": false,
            "isMobile": false,
            "mqttReadOnly": false,
            "httpReadOnly": false,
            "mqttPublishTopics": "Observations",
            "observation": {
                "samplingGeometry": "http://www.opengis.net/def/param-name/OGC-OM/2.0/samplingGeometry",
                "verticalFrom": "verticalFrom",
                "verticalTo": "verticalTo",
                "verticalFromTo": "vertical"
            }
        },
        "https://github.com/52North/sensorweb-server-sta/extension/server-version.md": {
            "git.repository": "https://github.com/52North/sensorweb-server-sta",
            "git.lastCommitDate": "2020-12-16 12:55:46+0100",
            "git.path": "d23185a8b80110405841d7a230345d2ebf26a53a",
            "git.lastCommitMessage": "[maven-release-plugin] prepare release v3.0.0",
            "git.revision": "d23185a8b80110405841d7a230345d2ebf26a53a",
            "project.name": "52North SensorThingsAPI",
            "project.version": "3.0.0",
            "project.time": "2020-12-16T12:04:42.179Z",
            "git.builddate": "2020-12-16 13:04:46+0100"
        }
    }
}

Now you successfully installed your STA.