All software development under the name "SIR" / "Sensor Instance Registry" is continued in OpenSensorSearch
General information about the SIR and its concept can be found at http://52north.org/communities/sensorweb/discovery/index.html
This document describes the install process of the 52°North Sensor Instance Registry (SIR) version 0.3.x (
DEPRECATED, see OpenSensorSearch
What you are doing when following the installation procedure?
You will download a provided archive file that is ready for deployment, or check out the SIR package from a SVN repository. The package contains an implementation of the SIR as a Java Servlet
. Executing the installation steps will deploy this service in your Apache Tomcat (or any other) web container
as an web application (sometimes called "webapp").
Some words on the SIR
The Sensor Instance Registry is a web service interface for discovering sensors, collecting sensor metadata (based on SensorML
), handling sensor status information and automatically inserting sensor metadata into OGC Catalogues (based on the ebRIM Catalogue Information Model).
Generally the SIR interface can be grouped into four parts
: sensor discovery (possibly using semantic search via a Sensor Observable Registry) , sensor metadata collection (including harvesting of SWE service instances), sensor status handling , catalog linking.
documents which are processed by the SIR shall comply with the SensorML
Profile for Discovery as it is defined in OGC 09-163
. The profile ensures the completeness of sensor metadata for discovery purposes as well as a consistent metadata structure that can automatically be processed by a SIR instance.
The current release implements the following operations:
- This operation allows a client to receive service metadata (namely Capabilities) documents that describe the cabilities of the specific server implementation.
- This operation allows a client to search for sensor instances and related service instances. It is possible to specify spatial, temporal and thematic search criteria.
- This operation allows a client to retrieve a SensorML based description of a sensor managed by a SIR instance.
- This operation allows a client to initiate the harvesting process (retrieval and processing) of sensor metadata from a certain SWE service instance.
- This operation allows a client to insert sensor metadata (complete metadata records or relationships between sensors and services) into a SIR instance.
- This operation allows a client to delete sensor metadata (complete metadata records or relationships between sensors and services) from a SIR instance.
- This operation allows a client to update the description of a sensor already contained in a SIR instance.
- This operation allows a client to request status information about a specific sensor using spatial, temporal and thematic options.
- This operation allows a client to insert status information about a sensor contained in the SIR instance.
- This operation allows a client to establish a (one time only or scheduled) link between a SIR instance and a specific OGC Catalogue server. The request offers options for one time only, or repeated push operations of the full SIR database.
- This operation allows a client to stop the process of pushing metadata from a SIR instance into an OGC Catalog server.
This list contains a list of minimum and tested required software. Other, especially newer, versions might work as well – please contact the developers if you run SIR successfully in a different set-up.
- Java Runtime Environment (JRE) or Java Contributor Kit (JDK), version 1.6
- Apache Tomcat 6.0.xx (or any other servlet container)
- PostreSQL Version 8.3.x
- PostGIS Version 1.5.x
- SVN-Client (if you want to download the SIR package from the SVN repository), for example TortoiseSVN or Eclipse
- Apache Maven (if you want to build SIR yourself)
Get Required Progammes
Software project is deprecated, see OpenSensorSearch
for the follow-up software project.
Binary (WAR file)
You can also download a deployable war file at the URL given below and change the configuration files manually after deployment (see section Changing Settings):
Please be aware that this might not be the latest version from the SVN but only sparsely released major versions.
The way you configure your SIR instance depends on the way of deployment. If you build
the SIR yourself using Maven
, please read this section. If you deploy
the Tomcat based on
an existing WAR file
, please skip this section and read on in "Create the Database"
The SIR build configuration is completely managed in Maven, i.e. in the root POM filem using profiles
. The development profile
is activated by default
and is ready to use for development on localhost. The deployment profile
and must be configured in two places, the properties section
and the properties section within the profiles section
- The file
/pom.xml file in the root of the source project. You can edit deployment parameters such as the service path and the different available endpoints. The standard configuration looks as follows:
- The file
<home folder>/.m2/settings.xml. This is your Maven settings file that is used to store usernames and passwords only. An example configuration looks as follows:
- The properties in this file are used to fill in the placeholders in the deployment profile.
Based on the properties in these files, Maven will automatically fill the placeholders in the runtime configuration files
which are described later in this tutorrial.
You have to run Maven with the build file
in the dependency projects first.
Build and Install Dependencies
- Please make sure that Maven is correctly installed.
- Open a command line and navigate to the directory .../52n-json.
mvn install. The build file will be found and the build process started. You should see the message "BUILD SUCCESS".
- Repeat the process with the folders
- Open a command line and navigate to the directory
mvn package. The build file will be found and the build process started. You should see the message "BUILD SUCCESS".
- The deployable war file including your settings is now available at .../SIR/52n-sir/target/SIR.war.
When creating the database and the tables be sure to use the same account you use later to connect to the database, otherwise you might get problems with PostgreSQL
- Use the pgAdmin III – Tool to connect to the database (in Windows XP: Start>Programms>PostgreSQL 8.x >pgAdmin III).
- You find your „PostgresSQL Database Server 8.x“ in the upper left corner of the window.
- Right click on the „PostgresSQL Database Server 8.x“ and choose „Connect“ in the pop up menu.
- Type in the name and password of the superuser you have chosen in the installation steps. Now the red cross over the icon of the server disappears and you are connected to the server. When you right click on “databases” choose “new databases”.
- In the opening window you can create the new database for your SIR (e.g.
SIR_DATABASE) by adding the required information and setting the “template” field to “template_postgis”.
Create the table structure of the database
- Start the pgAdmin III (see former chapter).
- Select the created database and click on the button „Execute common SQL query“ in the toolbar. The query window of pgAdmin III appears.
- Download the file
datamodel_sir.sql from the following URL https://svn.52north.org/svn/swe/incubation/SIR/trunk/52n-sir/src/main/resources/datamodel_sir.sql or from the folder
- Click the „Open file“ button and navigate to the folder with the downloaded file.
- Open the file
datamodel_sir.sql. The SQL statements now appear in the query field.
- Click the „Execute query“ button to execute the statements in the downloaded file. In the lower field appears the message „Query was succesfull.“ The tables are created now.
- Close pgAdmin III.
- Make sure that your Tomcat is installed and running.
- Navigate to the Tomcat Manager, e.g. http://localhost:8080/manager/html.
- Scroll down to the section “WAR file to deploy” and select the WAR file to install, i.e. the file your created in section "Build Application".
- Click on “deploy”. The new service instance will be shown in the application list.
After installation you can change the mandatory settings and all advanged optional settings in the files in the folder
. The latter contains all database related settings, the former everything else. If you deployed an unconfigured war file, please change at least the following settings, then restart the webapp for the changes to take effect.
|| Set the correct
SERVICEURL for the test clients and the capabilities file. Otherwise (test) clients will not work!
|| Set the database settings, at least user and password.
All (other) settings should be handled with care! You can change the content of the capabilities document in the file
. Be aware of the content that is updated during runtime.
This section contains some basic tests to ensure your installation was successful.
Capabilities Request via HTTP GET
- Open your browser.
- Enter the following text into the address bar:
- Optionally replace the localhost and port with the correct address of a remote server.
- The capabilities response document is now shown in your browser.
Requests via HTTP POST
- Start your internet browser (e.g. Mozilla Firefox).
- Open the SIR simple test client at http://localhost:8080/SIR/testClient.html. You find a simple GUI that allows you to try out some example requests by selection from the “Request examples” drop down list.
- Alternatively, use any programming language or environment that is able to issue HTTP POST request.
- Alternatively, you can use the more advanced SIR client at the URL http://localhost:8080/SIR/index.jsp to interactively create requests and inspect responses.
If you have any question concerning the installation and configuration process, feel free to contact the 52°North SWE mailing list
. For more information visit http://52north.org/resources/mailing-list-and-forums/
| Issue No.
|| Question and Solution
Where do I find the administrator username and password of my Tomcat?
The login datas are stored in the
tomcat-users.xml in your
Tomcat 6.0/conf Folder.