Index: src/mapservice/codegen/code_generator
===================================================================
--- src/mapservice/codegen/code_generator	(revision 28198a1e37a102d2c3b294f60e3e547fb8a2b16d)
+++ src/mapservice/codegen/code_generator	(revision 13cbe66f44f250d5e3f76cda11e899f528e510df)
@@ -2,7 +2,9 @@
 
 DIR=`dirname "$0"`
+TARGET="${DIR}/../src-gen/openapi_server/"
 
 echo "Preparing symlinks"
-cd ${DIR}/../src-gen/openapi_server/
+mkdir -p "${TARGET}"
+cd "${TARGET}"
 if [ ! -L server_impl ]; then
 	ln -s ../../src/server_impl/
Index: src/mapservice/codegen/templates/__main__.mustache
===================================================================
--- src/mapservice/codegen/templates/__main__.mustache	(revision 28198a1e37a102d2c3b294f60e3e547fb8a2b16d)
+++ src/mapservice/codegen/templates/__main__.mustache	(revision 13cbe66f44f250d5e3f76cda11e899f528e510df)
@@ -8,9 +8,13 @@
 import connexion
 from flask_cors import CORS
-from flask import render_template
+#from flask import render_template
+import flask
+from sqlalchemy import event
 
 from {{packageName}} import encoder
 
 from {{packageName}}.server_impl.database.Model import db, User, ApiKey, db_test_setup
+
+from {{packageName}}.server_impl.ValidatorWorkaround import ValidatorWorkaround
 
 app = connexion.App(__name__, specification_dir='./openapi/')
@@ -20,4 +24,11 @@
 @application.before_first_request
 def create_database():
+	@event.listens_for(db.engine, "connect")
+	def load_spatialite(dbapi_conn, connection_record):
+		if 'sqlite' in flask.current_app.config['SQLALCHEMY_DATABASE_URI']:
+			# From https://geoalchemy-2.readthedocs.io/en/latest/spatialite_tutorial.html
+			dbapi_conn.enable_load_extension(True)
+			dbapi_conn.load_extension('/usr/local/lib64/mod_spatialite')
+
 	db_test_setup()
 
@@ -28,5 +39,5 @@
 def main():
 	application.json_encoder = encoder.JSONEncoder
-	app.add_api('openapi.yaml', arguments={'title': '{{appName}}'}, validate_responses=True)
+	app.add_api('openapi.yaml', arguments={'title': '{{appName}}'}, validate_responses=True, strict_validation=True, validator_map={'response': ValidatorWorkaround})
 	application.config.from_object('{{packageName}}.server_impl.Config.DevelopmentConfig')
 
Index: src/mapservice/codegen/templates/requirements.mustache
===================================================================
--- src/mapservice/codegen/templates/requirements.mustache	(revision 28198a1e37a102d2c3b294f60e3e547fb8a2b16d)
+++ src/mapservice/codegen/templates/requirements.mustache	(revision 13cbe66f44f250d5e3f76cda11e899f528e510df)
@@ -1,3 +1,3 @@
-connexion == 2.0.2
+connexion == 2.2.0
 swagger-ui-bundle == 0.0.2
 python_dateutil == 2.6.0
@@ -8,2 +8,3 @@
 flask-sqlalchemy
 flask-cors
+shapely
Index: src/mapservice/openapi.yaml
===================================================================
--- src/mapservice/openapi.yaml	(revision 28198a1e37a102d2c3b294f60e3e547fb8a2b16d)
+++ src/mapservice/openapi.yaml	(revision 13cbe66f44f250d5e3f76cda11e899f528e510df)
@@ -81,5 +81,5 @@
           description: CORS prefilght requests should return 200 as status code
           content:
-           application/json: {}
+            application/json: {}
   '/user/apikey_create':
     get:
@@ -98,5 +98,5 @@
               schema:
                 $ref: '#/components/schemas/apiKeys'
-              example: 'NewApiKey4711'
+              example: NewApiKey4711
         '400':
           $ref: '#/components/responses/BadRequest'
@@ -119,5 +119,5 @@
           schema:
             $ref: '#/components/schemas/apiKey'
-          example: 'DelApiKey4711'
+          example: DelApiKey4711
       responses:
         '200':
@@ -127,9 +127,11 @@
               schema:
                 $ref: '#/components/schemas/apiKeys'
-              example: 'ApiKey4711'
+              example: ApiKey4711
         '400':
           $ref: '#/components/responses/BadRequest'
         '401':
           $ref: '#/components/responses/Unauthorized'
+        '404':
+          $ref: '#/components/responses/NotFound'
   '/user/activate/{activation_code}':
     get:
@@ -146,5 +148,5 @@
           schema:
             $ref: '#/components/schemas/activationCode'
-          example: 'dac9630aec642a428cd73f4be0a03569'
+          example: dac9630aec642a428cd73f4be0a03569
       responses:
         '302':
@@ -154,6 +156,6 @@
               schema:
                 type: string
-              description: URL to the website, showing the result of the activation
-  /waters:
+              description: 'URL to the website, showing the result of the activation'
+  '/waters':
     get:
       description: Returns all waters
@@ -167,10 +169,10 @@
           schema:
             $ref: '#/components/schemas/itemName'
-          example: 'Missi'
+          example: Missi
         - name: manager
           in: query
           schema:
             $ref: '#/components/schemas/username'
-          example: 'jane'
+          example: jane
         - $ref: '#/components/parameters/orderBy'
         - $ref: '#/components/parameters/offset'
@@ -186,4 +188,6 @@
                 Waters:
                   $ref: '#/components/examples/waters'
+        '404':
+          $ref: '#/components/responses/NotFound'
     post:
       description: Adds a new water to the database
@@ -200,8 +204,8 @@
             schema:
               $ref: '#/components/schemas/WaterCreation'
-            example: 
+            example:
               name: Rhein
               osmId: 1756854
-              osmType: 'Relation'
+              osmType: Relation
       responses:
         '201':
@@ -224,5 +228,5 @@
         - waters
       summary: Represents a water
-      operationId: waterGetById
+      operationId: watersGetById
       parameters:
         - name: id
@@ -242,4 +246,133 @@
                 Water:
                   $ref: '#/components/examples/Water'
+        '404':
+          $ref: '#/components/responses/NotFound'
+  '/waters/{water_id}/gauges':
+    get:
+      description: Returns all gauges of water waterId
+      tags:
+        - waters
+      summary: Find gauges of water waterId by gaugeId
+      operationId: watersGaugesGet
+      parameters:
+        - name: water_id
+          in: path
+          description: Water ID
+          required: true
+          schema:
+            $ref: '#/components/schemas/itemId'
+        - name: name
+          in: query
+          schema:
+            $ref: '#/components/schemas/itemName'
+          example: Missi
+        - name: manager
+          in: query
+          schema:
+            $ref: '#/components/schemas/username'
+          example: jane
+        - $ref: '#/components/parameters/orderBy'
+        - $ref: '#/components/parameters/offset'
+        - $ref: '#/components/parameters/limit'
+      responses:
+        '200':
+          description: OK
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/Gauges'
+              examples:
+                Gauges:
+                  $ref: '#/components/examples/Gauges'
+            application/geo+json:
+              schema:
+                $ref: '#/components/schemas/GaugesGeoJson'
+              examples:
+                Gauge:
+                  $ref: '#/components/examples/GaugesGeoJson'
+    post:
+      description: Adds a new gauge for water waterId to the database
+      tags:
+        - waters
+      summary: Add a new water
+      operationId: watersGaugeCreate
+      parameters:
+        - name: water_id
+          in: path
+          description: Water ID
+          required: true
+          schema:
+            $ref: '#/components/schemas/itemId'
+      security:
+        - basicAuth: []
+        - apiKeyAuth: []
+      requestBody:
+        content:
+          application/json:
+            schema:
+              $ref: '#/components/schemas/GaugeCreation'
+            example:
+              name: New Orleans
+              location:
+                - 90.136111
+                - 29.934722
+      responses:
+        '201':
+          description: Gauge created
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/Gauge'
+              examples:
+                Gauge:
+                  $ref: '#/components/examples/Gauge'
+            application/geo+json:
+              schema:
+                $ref: '#/components/schemas/GaugeGeoJson'
+              examples:
+                Gauge:
+                  $ref: '#/components/examples/GaugeGeoJson'
+        '400':
+          $ref: '#/components/responses/BadRequest'
+        '401':
+          $ref: '#/components/responses/Unauthorized'
+  '/waters/{water_id}/gauges/{gauge_id}':
+    get:
+      description: Returns the gauge identified by id
+      tags:
+        - waters
+      summary: Represents a gauge
+      operationId: watersGaugeGetById
+      parameters:
+        - name: water_id
+          in: path
+          description: Water ID
+          required: true
+          schema:
+            $ref: '#/components/schemas/itemId'
+        - name: gauge_id
+          in: path
+          description: Gauge ID
+          required: true
+          schema:
+            $ref: '#/components/schemas/itemId'
+      responses:
+        '200':
+          description: OK
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/Gauge'
+              examples:
+                Gauge:
+                  $ref: '#/components/examples/Gauge'
+            application/geo+json:
+              schema:
+                $ref: '#/components/schemas/GaugeGeoJson'
+              examples:
+                Gauge:
+                  $ref: '#/components/examples/GaugeGeoJson'
+        '400':
+          $ref: '#/components/responses/BadRequest'
         '404':
           $ref: '#/components/responses/NotFound'
@@ -277,4 +410,16 @@
       title: Item Name
       type: string
+    order:
+      title: order
+      enum:
+        - desc
+        - asc
+      type: string
+      default: asc
+      description: |
+        Sort order:
+          * `asc` - Ascending, from A to Z
+          * `desc` - Descending, from Z to A
+      example: asc
     osmType:
       title: OSM type of item (N|W|R)
@@ -284,4 +429,30 @@
         - Way
         - Relation
+    comment:
+      title: Comment of an item
+      type: string
+    point:
+      title: 'Point of type [longitude, latitude]'
+      type: array
+      maxItems: 2
+      minItems: 2
+      items:
+        type: number
+    geoJsonType:
+      title: Type of GeoJSON objects
+      type: string
+      enum:
+        - Feature
+        - Point
+    geoJsonPoint:
+      type: object
+      description: GeoJSon geometry
+      externalDocs:
+        url: 'http://geojson.org/geojson-spec.html#id2'
+      properties:
+        type:
+          type: string
+        coordinates:
+          $ref: '#/components/schemas/point'
     User:
       title: User
@@ -334,4 +505,6 @@
         osmType:
           $ref: '#/components/schemas/osmType'
+        gauges:
+          $ref: '#/components/schemas/Gauges'
       required:
         - waterId
@@ -354,16 +527,68 @@
       items:
         $ref: '#/components/schemas/Water'
-    order:
-      title: order
-      enum:
-        - desc
-        - asc
-      type: string
-      default: asc
-      description: |
-        Sort order:
-          * `asc` - Ascending, from A to Z
-          * `desc` - Descending, from Z to A
-      example: asc
+    Gauge:
+      title: Gauge
+      type: object
+      properties:
+        gaugeId:
+          $ref: '#/components/schemas/itemId'
+        name:
+          $ref: '#/components/schemas/itemName'
+        manager:
+          $ref: '#/components/schemas/username'
+        location:
+          $ref: '#/components/schemas/point'
+        comment:
+          $ref: '#/components/schemas/comment'
+      required:
+        - gaugeId
+        - name
+        - location
+    GaugeCreation:
+      title: Gauge for Creation
+      type: object
+      properties:
+        name:
+          $ref: '#/components/schemas/itemName'
+        location:
+          $ref: '#/components/schemas/point'
+        comment:
+          $ref: '#/components/schemas/comment'
+      required:
+        - name
+        - location
+    Gauges:
+      title: Gauges
+      type: array
+      items:
+        $ref: '#/components/schemas/Gauge'
+    GaugeGeoJson:
+      title: Gauge
+      type: object
+      properties:
+        type:
+          $ref: '#/components/schemas/geoJsonType'
+        geometry:
+          $ref: '#/components/schemas/geoJsonPoint'
+        properties:
+          type: object
+          properties:
+            name:
+              $ref: '#/components/schemas/itemName'
+            manager:
+              $ref: '#/components/schemas/username'
+            comment:
+              $ref: '#/components/schemas/comment'
+          required:
+            - name
+      required:
+        - type
+        - geometry
+        - properties
+    GaugesGeoJson:
+      title: Gauges in GeoJson format
+      type: array
+      items:
+        $ref: '#/components/schemas/GaugeGeoJson'
     HttpError:
       title: HTTP Error Response Object
@@ -385,5 +610,5 @@
         type: string
         default: name
-        example: 'name'
+        example: name
     order:
       name: order
@@ -443,15 +668,58 @@
         name: Mississippi
         osmId: 1756854
-        osmType: 'Relation'
+        osmType: Relation
       summary: A water example object for creation of a water
     waters:
       value:
         - waterId: 1
-          name: 'Mississippi'
+          name: Mississippi
           osmId: 1756854
-          osmType: 'Relation'
+          osmType: Relation
         - waterId: 2
-          name: 'Bodensee'
+          name: Bodensee
       summary: A sample list with waters
+    Gauge:
+      value:
+        gaugeId: 1
+        name: New Orleans
+        manager: jane
+        location:
+          - 90.136111
+          - 29.934722
+        comment: Gauge for Mississippi in New Orleans
+    Gauges:
+      value:
+        - gaugeId: 1
+          name: New Orleans
+          manager: jane
+          location:
+            - 90.136111
+            - 29.934722
+      summary: A sample list of gauges
+    GaugeGeoJson:
+      value:
+        type: Feature
+        geometry:
+          type: Point
+          coordinates:
+            - 90.136111
+            - 29.934722 
+          properties:
+            name: New Orleans
+            manager: jane
+            comment: Gauge for Mississippi in New Orleans
+    GaugesGeoJson:
+      value:
+        - type: Feature
+          geometry:
+            type: Point
+            coordinates:
+              - 90.136111
+              - 29.934722 
+            properties:
+              name: New Orleans
+              manager: jane
+              comment: Gauge for Mississippi in New Orleans
+      summary: A sample list of gauges in GeoJson format
     HttpError:
       value:
@@ -492,4 +760,3 @@
       Sea)
   - name: users
-    description: >-
-      All actions used to manage users and api keys
+    description: All actions used to manage users and api keys
Index: src/mapservice/src-gen/.openapi-generator/VERSION
===================================================================
--- src/mapservice/src-gen/.openapi-generator/VERSION	(revision 28198a1e37a102d2c3b294f60e3e547fb8a2b16d)
+++ src/mapservice/src-gen/.openapi-generator/VERSION	(revision 13cbe66f44f250d5e3f76cda11e899f528e510df)
@@ -1,1 +1,1 @@
-3.3.4
+4.0.0
Index: src/mapservice/src-gen/openapi_server/__main__.py
===================================================================
--- src/mapservice/src-gen/openapi_server/__main__.py	(revision 28198a1e37a102d2c3b294f60e3e547fb8a2b16d)
+++ src/mapservice/src-gen/openapi_server/__main__.py	(revision 13cbe66f44f250d5e3f76cda11e899f528e510df)
@@ -3,9 +3,13 @@
 import connexion
 from flask_cors import CORS
-from flask import render_template
+#from flask import render_template
+import flask
+from sqlalchemy import event
 
 from openapi_server import encoder
 
 from openapi_server.server_impl.database.Model import db, User, ApiKey, db_test_setup
+
+from openapi_server.server_impl.ValidatorWorkaround import ValidatorWorkaround
 
 app = connexion.App(__name__, specification_dir='./openapi/')
@@ -15,4 +19,11 @@
 @application.before_first_request
 def create_database():
+	@event.listens_for(db.engine, "connect")
+	def load_spatialite(dbapi_conn, connection_record):
+		if 'sqlite' in flask.current_app.config['SQLALCHEMY_DATABASE_URI']:
+			# From https://geoalchemy-2.readthedocs.io/en/latest/spatialite_tutorial.html
+			dbapi_conn.enable_load_extension(True)
+			dbapi_conn.load_extension('/usr/local/lib64/mod_spatialite')
+
 	db_test_setup()
 
@@ -23,5 +34,5 @@
 def main():
 	application.json_encoder = encoder.JSONEncoder
-	app.add_api('openapi.yaml', arguments={'title': 'GNUBoat Mapservice API'}, validate_responses=True)
+	app.add_api('openapi.yaml', arguments={'title': 'GNUBoat Mapservice API'}, validate_responses=True, strict_validation=True, validator_map={'response': ValidatorWorkaround})
 	application.config.from_object('openapi_server.server_impl.Config.DevelopmentConfig')
 
Index: src/mapservice/src-gen/openapi_server/controllers/waters_controller.py
===================================================================
--- src/mapservice/src-gen/openapi_server/controllers/waters_controller.py	(revision 28198a1e37a102d2c3b294f60e3e547fb8a2b16d)
+++ src/mapservice/src-gen/openapi_server/controllers/waters_controller.py	(revision 13cbe66f44f250d5e3f76cda11e899f528e510df)
@@ -2,22 +2,10 @@
 import six
 
+from openapi_server.models.gauge import Gauge  # noqa: E501
+from openapi_server.models.gauge_creation import GaugeCreation  # noqa: E501
 from openapi_server.models.http_error import HttpError  # noqa: E501
 from openapi_server.models.water import Water  # noqa: E501
 from openapi_server.models.water_creation import WaterCreation  # noqa: E501
 from openapi_server import util
-
-from openapi_server.server_impl.controllers import WatersController
-
-def water_get_by_id(id):  # noqa: E501
-    """Represents a water
-
-    Returns the water identified by id # noqa: E501
-
-    :param id: Item ID
-    :type id: int
-
-    :rtype: Water
-    """
-    return WatersController.water_get_by_id(id)
 
 from openapi_server.server_impl.controllers import WatersController
@@ -36,4 +24,62 @@
         water_creation = WaterCreation.from_dict(connexion.request.get_json())  # noqa: E501
     return WatersController.waters_create(water_creation=water_creation)
+
+from openapi_server.server_impl.controllers import WatersController
+
+def waters_gauge_create(water_id, gauge_creation=None):  # noqa: E501
+    """Add a new water
+
+    Adds a new gauge for water waterId to the database # noqa: E501
+
+    :param water_id: Water ID
+    :type water_id: int
+    :param gauge_creation: 
+    :type gauge_creation: dict | bytes
+
+    :rtype: Gauge
+    """
+    if connexion.request.is_json:
+        gauge_creation = GaugeCreation.from_dict(connexion.request.get_json())  # noqa: E501
+    return WatersController.waters_gauge_create(water_id, gauge_creation=gauge_creation)
+
+from openapi_server.server_impl.controllers import WatersController
+
+def waters_gauge_get_by_id(water_id, gauge_id):  # noqa: E501
+    """Represents a gauge
+
+    Returns the gauge identified by id # noqa: E501
+
+    :param water_id: Water ID
+    :type water_id: int
+    :param gauge_id: Gauge ID
+    :type gauge_id: int
+
+    :rtype: Gauge
+    """
+    return WatersController.waters_gauge_get_by_id(water_id, gauge_id)
+
+from openapi_server.server_impl.controllers import WatersController
+
+def waters_gauges_get(water_id, name=None, manager=None, order_by=None, offset=None, limit=None):  # noqa: E501
+    """Find gauges of water waterId by gaugeId
+
+    Returns all gauges of water waterId # noqa: E501
+
+    :param water_id: Water ID
+    :type water_id: int
+    :param name: 
+    :type name: str
+    :param manager: 
+    :type manager: str
+    :param order_by: Order by field: name
+    :type order_by: str
+    :param offset: Skip over a number of elements by specifying an offset value for the query
+    :type offset: int
+    :param limit: Limit the number of elements on the response
+    :type limit: int
+
+    :rtype: List[Gauge]
+    """
+    return WatersController.waters_gauges_get(water_id, name=name, manager=manager, order_by=order_by, offset=offset, limit=limit)
 
 from openapi_server.server_impl.controllers import WatersController
@@ -58,2 +104,16 @@
     """
     return WatersController.waters_get(name=name, manager=manager, order_by=order_by, offset=offset, limit=limit)
+
+from openapi_server.server_impl.controllers import WatersController
+
+def waters_get_by_id(id):  # noqa: E501
+    """Represents a water
+
+    Returns the water identified by id # noqa: E501
+
+    :param id: Item ID
+    :type id: int
+
+    :rtype: Water
+    """
+    return WatersController.waters_get_by_id(id)
Index: src/mapservice/src-gen/openapi_server/models/__init__.py
===================================================================
--- src/mapservice/src-gen/openapi_server/models/__init__.py	(revision 28198a1e37a102d2c3b294f60e3e547fb8a2b16d)
+++ src/mapservice/src-gen/openapi_server/models/__init__.py	(revision 13cbe66f44f250d5e3f76cda11e899f528e510df)
@@ -4,4 +4,10 @@
 from __future__ import absolute_import
 # import models into model package
+from openapi_server.models.gauge import Gauge
+from openapi_server.models.gauge_creation import GaugeCreation
+from openapi_server.models.gauge_geo_json import GaugeGeoJson
+from openapi_server.models.gauge_geo_json_properties import GaugeGeoJsonProperties
+from openapi_server.models.geo_json_point import GeoJsonPoint
+from openapi_server.models.geo_json_type import GeoJsonType
 from openapi_server.models.http_error import HttpError
 from openapi_server.models.order import Order
Index: src/mapservice/src-gen/openapi_server/models/water.py
===================================================================
--- src/mapservice/src-gen/openapi_server/models/water.py	(revision 28198a1e37a102d2c3b294f60e3e547fb8a2b16d)
+++ src/mapservice/src-gen/openapi_server/models/water.py	(revision 13cbe66f44f250d5e3f76cda11e899f528e510df)
@@ -7,6 +7,9 @@
 
 from openapi_server.models.base_model_ import Model
+from openapi_server.models.gauge import Gauge
+from openapi_server.models.osm_type import OsmType
 from openapi_server import util
 
+from openapi_server.models.gauge import Gauge  # noqa: E501
 from openapi_server.models.osm_type import OsmType  # noqa: E501
 
@@ -17,5 +20,5 @@
     """
 
-    def __init__(self, water_id=None, name=None, manager=None, osm_id=None, osm_type=None):  # noqa: E501
+    def __init__(self, water_id=None, name=None, manager=None, osm_id=None, osm_type=None, gauges=None):  # noqa: E501
         """Water - a model defined in OpenAPI
 
@@ -30,4 +33,6 @@
         :param osm_type: The osm_type of this Water.  # noqa: E501
         :type osm_type: OsmType
+        :param gauges: The gauges of this Water.  # noqa: E501
+        :type gauges: List[Gauge]
         """
         self.openapi_types = {
@@ -36,5 +41,6 @@
             'manager': str,
             'osm_id': int,
-            'osm_type': OsmType
+            'osm_type': OsmType,
+            'gauges': List[Gauge]
         }
 
@@ -44,5 +50,6 @@
             'manager': 'manager',
             'osm_id': 'osmId',
-            'osm_type': 'osmType'
+            'osm_type': 'osmType',
+            'gauges': 'gauges'
         }
 
@@ -52,4 +59,5 @@
         self._osm_id = osm_id
         self._osm_type = osm_type
+        self._gauges = gauges
 
     @classmethod
@@ -172,2 +180,23 @@
 
         self._osm_type = osm_type
+
+    @property
+    def gauges(self):
+        """Gets the gauges of this Water.
+
+
+        :return: The gauges of this Water.
+        :rtype: List[Gauge]
+        """
+        return self._gauges
+
+    @gauges.setter
+    def gauges(self, gauges):
+        """Sets the gauges of this Water.
+
+
+        :param gauges: The gauges of this Water.
+        :type gauges: List[Gauge]
+        """
+
+        self._gauges = gauges
Index: src/mapservice/src-gen/openapi_server/models/water_creation.py
===================================================================
--- src/mapservice/src-gen/openapi_server/models/water_creation.py	(revision 28198a1e37a102d2c3b294f60e3e547fb8a2b16d)
+++ src/mapservice/src-gen/openapi_server/models/water_creation.py	(revision 13cbe66f44f250d5e3f76cda11e899f528e510df)
@@ -7,4 +7,5 @@
 
 from openapi_server.models.base_model_ import Model
+from openapi_server.models.osm_type import OsmType
 from openapi_server import util
 
Index: src/mapservice/src-gen/openapi_server/openapi/openapi.yaml
===================================================================
--- src/mapservice/src-gen/openapi_server/openapi/openapi.yaml	(revision 28198a1e37a102d2c3b294f60e3e547fb8a2b16d)
+++ src/mapservice/src-gen/openapi_server/openapi/openapi.yaml	(revision 13cbe66f44f250d5e3f76cda11e899f528e510df)
@@ -23,5 +23,6 @@
       default: v1
 tags:
-- description: A water is a river (like Mississippi, lake (Lake Ontario), or a sea (North Sea)
+- description: A water is a river (like Mississippi, lake (Lake Ontario), or a sea
+    (North Sea)
   name: waters
 - description: All actions used to manage users and api keys
@@ -30,5 +31,5 @@
   /user:
     get:
-      description: Returns information for a user
+      description: Returns information of current/authorized user
       operationId: users_get
       responses:
@@ -112,4 +113,32 @@
       - users
       x-openapi-router-controller: openapi_server.controllers.users_controller
+  /user/activate/{activation_code}:
+    get:
+      description: Activates a user account
+      operationId: users_activate
+      parameters:
+      - description: Activation code
+        example: dac9630aec642a428cd73f4be0a03569
+        explode: false
+        in: path
+        name: activation_code
+        required: true
+        schema:
+          $ref: '#/components/schemas/activationCode'
+        style: simple
+      responses:
+        302:
+          description: OK or not OK
+          headers:
+            Location:
+              description: URL to the website, showing the result of the activation
+              explode: false
+              schema:
+                type: string
+              style: simple
+      summary: Activates a user account
+      tags:
+      - users
+      x-openapi-router-controller: openapi_server.controllers.users_controller
   /user/apikey_create:
     get:
@@ -144,5 +173,4 @@
       security:
       - basicAuth: []
-      - apiKeyAuth: []
       summary: Returns a new API key
       tags:
@@ -189,36 +217,16 @@
                 $ref: '#/components/schemas/HttpError'
           description: Unauthorized (401) acces to resource
+        404:
+          content:
+            application/json:
+              examples:
+                HttpError:
+                  $ref: '#/components/examples/HttpError'
+              schema:
+                $ref: '#/components/schemas/HttpError'
+          description: Water with given Id not found
       security:
       - basicAuth: []
-      - apiKeyAuth: []
       summary: Deletes API key
-      tags:
-      - users
-      x-openapi-router-controller: openapi_server.controllers.users_controller
-  /user/activate/{activation_code}:
-    get:
-      description: Activates a user account
-      operationId: users_activate
-      parameters:
-      - description: Activation code
-        example: dac9630aec642a428cd73f4be0a03569
-        explode: false
-        in: path
-        name: activation_code
-        required: true
-        schema:
-          $ref: '#/components/schemas/activationCode'
-        style: simple
-      responses:
-        302:
-          description: OK or not OK
-          headers:
-            Location:
-              description: URL to the website, showing the result of the activation
-              explode: false
-              schema:
-                type: string
-              style: simple
-      summary: Activates a user account
       tags:
       - users
@@ -255,5 +263,6 @@
           type: string
         style: form
-      - description: Skip over a number of elements by specifying an offset value for the query
+      - description: Skip over a number of elements by specifying an offset value
+          for the query
         explode: true
         in: query
@@ -287,4 +296,13 @@
                 $ref: '#/components/schemas/waters'
           description: OK
+        404:
+          content:
+            application/json:
+              examples:
+                HttpError:
+                  $ref: '#/components/examples/HttpError'
+              schema:
+                $ref: '#/components/schemas/HttpError'
+          description: Water with given Id not found
       summary: Find waters by id
       tags:
@@ -341,5 +359,5 @@
     get:
       description: Returns the water identified by id
-      operationId: water_get_by_id
+      operationId: waters_get_by_id
       parameters:
       - description: Item ID
@@ -371,4 +389,208 @@
           description: Water with given Id not found
       summary: Represents a water
+      tags:
+      - waters
+      x-openapi-router-controller: openapi_server.controllers.waters_controller
+  /waters/{water_id}/gauges:
+    get:
+      description: Returns all gauges of water waterId
+      operationId: waters_gauges_get
+      parameters:
+      - description: Water ID
+        explode: false
+        in: path
+        name: water_id
+        required: true
+        schema:
+          $ref: '#/components/schemas/itemId'
+        style: simple
+      - example: Missi
+        explode: true
+        in: query
+        name: name
+        required: false
+        schema:
+          $ref: '#/components/schemas/itemName'
+        style: form
+      - example: jane
+        explode: true
+        in: query
+        name: manager
+        required: false
+        schema:
+          $ref: '#/components/schemas/username'
+        style: form
+      - description: 'Order by field: name'
+        explode: true
+        in: query
+        name: orderBy
+        required: false
+        schema:
+          default: name
+          example: name
+          type: string
+        style: form
+      - description: Skip over a number of elements by specifying an offset value
+          for the query
+        explode: true
+        in: query
+        name: offset
+        required: false
+        schema:
+          default: 0
+          example: 0
+          format: int32
+          type: integer
+        style: form
+      - description: Limit the number of elements on the response
+        explode: true
+        in: query
+        name: limit
+        required: false
+        schema:
+          default: 10
+          example: 10
+          format: int32
+          type: integer
+        style: form
+      responses:
+        200:
+          content:
+            application/json:
+              examples:
+                Gauges:
+                  $ref: '#/components/examples/Gauges'
+              schema:
+                $ref: '#/components/schemas/Gauges'
+            application/geo+json:
+              examples:
+                Gauge:
+                  $ref: '#/components/examples/GaugesGeoJson'
+              schema:
+                $ref: '#/components/schemas/GaugesGeoJson'
+          description: OK
+      summary: Find gauges of water waterId by gaugeId
+      tags:
+      - waters
+      x-openapi-router-controller: openapi_server.controllers.waters_controller
+    post:
+      description: Adds a new gauge for water waterId to the database
+      operationId: waters_gauge_create
+      parameters:
+      - description: Water ID
+        explode: false
+        in: path
+        name: water_id
+        required: true
+        schema:
+          $ref: '#/components/schemas/itemId'
+        style: simple
+      requestBody:
+        content:
+          application/json:
+            example:
+              name: New Orleans
+              location:
+              - 90.136111
+              - 29.934722
+            schema:
+              $ref: '#/components/schemas/GaugeCreation'
+      responses:
+        201:
+          content:
+            application/json:
+              examples:
+                Gauge:
+                  $ref: '#/components/examples/Gauge'
+              schema:
+                $ref: '#/components/schemas/Gauge'
+            application/geo+json:
+              examples:
+                Gauge:
+                  $ref: '#/components/examples/GaugeGeoJson'
+              schema:
+                $ref: '#/components/schemas/GaugeGeoJson'
+          description: Gauge created
+        400:
+          content:
+            application/json:
+              examples:
+                HttpError:
+                  $ref: '#/components/examples/HttpError'
+              schema:
+                $ref: '#/components/schemas/HttpError'
+          description: Bad Request (400)
+        401:
+          content:
+            application/json:
+              examples:
+                HttpError:
+                  $ref: '#/components/examples/HttpError'
+              schema:
+                $ref: '#/components/schemas/HttpError'
+          description: Unauthorized (401) acces to resource
+      security:
+      - basicAuth: []
+      - apiKeyAuth: []
+      summary: Add a new water
+      tags:
+      - waters
+      x-openapi-router-controller: openapi_server.controllers.waters_controller
+  /waters/{water_id}/gauges/{gauge_id}:
+    get:
+      description: Returns the gauge identified by id
+      operationId: waters_gauge_get_by_id
+      parameters:
+      - description: Water ID
+        explode: false
+        in: path
+        name: water_id
+        required: true
+        schema:
+          $ref: '#/components/schemas/itemId'
+        style: simple
+      - description: Gauge ID
+        explode: false
+        in: path
+        name: gauge_id
+        required: true
+        schema:
+          $ref: '#/components/schemas/itemId'
+        style: simple
+      responses:
+        200:
+          content:
+            application/json:
+              examples:
+                Gauge:
+                  $ref: '#/components/examples/Gauge'
+              schema:
+                $ref: '#/components/schemas/Gauge'
+            application/geo+json:
+              examples:
+                Gauge:
+                  $ref: '#/components/examples/GaugeGeoJson'
+              schema:
+                $ref: '#/components/schemas/GaugeGeoJson'
+          description: OK
+        400:
+          content:
+            application/json:
+              examples:
+                HttpError:
+                  $ref: '#/components/examples/HttpError'
+              schema:
+                $ref: '#/components/schemas/HttpError'
+          description: Bad Request (400)
+        404:
+          content:
+            application/json:
+              examples:
+                HttpError:
+                  $ref: '#/components/examples/HttpError'
+              schema:
+                $ref: '#/components/schemas/HttpError'
+          description: Water with given Id not found
+      summary: Represents a gauge
       tags:
       - waters
@@ -414,4 +636,47 @@
       - waterId: 2
         name: Bodensee
+    Gauge:
+      value:
+        gaugeId: 1
+        name: New Orleans
+        manager: jane
+        location:
+        - 90.136111
+        - 29.934722
+        comment: Gauge for Mississippi in New Orleans
+    Gauges:
+      summary: A sample list of gauges
+      value:
+      - gaugeId: 1
+        name: New Orleans
+        manager: jane
+        location:
+        - 90.136111
+        - 29.934722
+    GaugeGeoJson:
+      value:
+        type: Feature
+        geometry:
+          type: Point
+          coordinates:
+          - 90.136111
+          - 29.934722
+          properties:
+            name: New Orleans
+            manager: jane
+            comment: Gauge for Mississippi in New Orleans
+    GaugesGeoJson:
+      summary: A sample list of gauges in GeoJson format
+      value:
+      - type: Feature
+        geometry:
+          type: Point
+          coordinates:
+          - 90.136111
+          - 29.934722
+          properties:
+            name: New Orleans
+            manager: jane
+            comment: Gauge for Mississippi in New Orleans
     HttpError:
       value:
@@ -440,5 +705,6 @@
       style: form
     offset:
-      description: Skip over a number of elements by specifying an offset value for the query
+      description: Skip over a number of elements by specifying an offset value for
+        the query
       explode: true
       in: query
@@ -513,4 +779,16 @@
       title: Item Name
       type: string
+    order:
+      default: asc
+      description: |
+        Sort order:
+          * `asc` - Ascending, from A to Z
+          * `desc` - Descending, from Z to A
+      enum:
+      - desc
+      - asc
+      example: asc
+      title: order
+      type: string
     osmType:
       enum:
@@ -520,4 +798,35 @@
       title: OSM type of item (N|W|R)
       type: string
+    comment:
+      title: Comment of an item
+      type: string
+    point:
+      items:
+        type: number
+      maxItems: 2
+      minItems: 2
+      title: Point of type [longitude, latitude]
+      type: array
+    geoJsonType:
+      enum:
+      - Feature
+      - Point
+      title: Type of GeoJSON objects
+      type: string
+    geoJsonPoint:
+      description: GeoJSon geometry
+      externalDocs:
+        url: http://geojson.org/geojson-spec.html#id2
+      properties:
+        type:
+          type: string
+        coordinates:
+          items:
+            type: number
+          maxItems: 2
+          minItems: 2
+          title: Point of type [longitude, latitude]
+          type: array
+      type: object
     User:
       example:
@@ -581,4 +890,19 @@
         osmId: 6
         name: name
+        gauges:
+        - manager: manager
+          name: name
+          location:
+          - 5.962133916683182
+          - 5.962133916683182
+          comment: comment
+          gaugeId: 1
+        - manager: manager
+          name: name
+          location:
+          - 5.962133916683182
+          - 5.962133916683182
+          comment: comment
+          gaugeId: 1
         waterId: 0
       properties:
@@ -599,4 +923,9 @@
         osmType:
           $ref: '#/components/schemas/osmType'
+        gauges:
+          items:
+            $ref: '#/components/schemas/Gauge'
+          title: Gauges
+          type: array
       required:
       - name
@@ -627,20 +956,93 @@
       title: waters
       type: array
-    order:
-      default: asc
-      description: |
-        Sort order:
-          * `asc` - Ascending, from A to Z
-          * `desc` - Descending, from Z to A
-      enum:
-      - desc
-      - asc
-      example: asc
-      title: order
-      type: string
+    Gauge:
+      example:
+        manager: manager
+        name: name
+        location:
+        - 5.962133916683182
+        - 5.962133916683182
+        comment: comment
+        gaugeId: 1
+      properties:
+        gaugeId:
+          format: int32
+          title: Item ID
+          type: integer
+        name:
+          title: Item Name
+          type: string
+        manager:
+          title: Username
+          type: string
+        location:
+          items:
+            type: number
+          maxItems: 2
+          minItems: 2
+          title: Point of type [longitude, latitude]
+          type: array
+        comment:
+          title: Comment of an item
+          type: string
+      required:
+      - gaugeId
+      - location
+      - name
+      title: Gauge
+      type: object
+    GaugeCreation:
+      example:
+        name: name
+        location:
+        - 0.8008281904610115
+        - 0.8008281904610115
+        comment: comment
+      properties:
+        name:
+          title: Item Name
+          type: string
+        location:
+          items:
+            type: number
+          maxItems: 2
+          minItems: 2
+          title: Point of type [longitude, latitude]
+          type: array
+        comment:
+          title: Comment of an item
+          type: string
+      required:
+      - location
+      - name
+      title: Gauge for Creation
+      type: object
+    Gauges:
+      items:
+        $ref: '#/components/schemas/Gauge'
+      title: Gauges
+      type: array
+    GaugeGeoJson:
+      properties:
+        type:
+          $ref: '#/components/schemas/geoJsonType'
+        geometry:
+          $ref: '#/components/schemas/geoJsonPoint'
+        properties:
+          $ref: '#/components/schemas/GaugeGeoJson_properties'
+      required:
+      - geometry
+      - properties
+      - type
+      title: Gauge
+      type: object
+    GaugesGeoJson:
+      items:
+        $ref: '#/components/schemas/GaugeGeoJson'
+      title: Gauges in GeoJson format
+      type: array
     HttpError:
       properties:
         code:
-          format: int32
           type: integer
         message:
@@ -651,4 +1053,17 @@
       title: HTTP Error Response Object
       type: object
+    GaugeGeoJson_properties:
+      properties:
+        name:
+          title: Item Name
+          type: string
+        manager:
+          title: Username
+          type: string
+        comment:
+          title: Comment of an item
+          type: string
+      required:
+      - name
   securitySchemes:
     basicAuth:
Index: src/mapservice/src-gen/openapi_server/static/css/GnuBoat.Colors.css
===================================================================
--- src/mapservice/src-gen/openapi_server/static/css/GnuBoat.Colors.css	(revision 28198a1e37a102d2c3b294f60e3e547fb8a2b16d)
+++ 	(revision )
@@ -1,34 +1,0 @@
-/*
-    Copyright (C) 2018 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-:root {
-	--gnuboat-turquois-dark: #347C7C;
-	--gnuboat-turquois-middle: #93C0C0;
-	--gnuboat-turquois-light: #BCD9D9;
-	--gnuboat-green-dark: #45A545;
-	--gnuboat-green-middle: #ACDFAC;
-	--gnuboat-green-light: #CCECCC;
-	--gnuboat-red: #8C1C00;
-	
-	--gnuboat-primary-dark: var(--gnuboat-turquois-dark);
-	--gnuboat-primary-middle: var(--gnuboat-turquois-middle);
-	--gnuboat-primary-light: var(--gnuboat-turquois-light);
-	--gnuboat-secondary-dark: var(--gnuboat-green-dark);
-	--gnuboat-secondary-middle: var(--gnuboat-green-middle);
-	--gnuboat-secondary-light: var(--gnuboat-green-light);
-	--gnuboat-warning: var(--gnuboat-red);
-}
Index: src/mapservice/src-gen/openapi_server/static/css/GnuBoat.css
===================================================================
--- src/mapservice/src-gen/openapi_server/static/css/GnuBoat.css	(revision 28198a1e37a102d2c3b294f60e3e547fb8a2b16d)
+++ 	(revision )
@@ -1,61 +1,0 @@
-/*
-    Copyright (C) 2016 - 2019 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-@import url("GnuBoat.Colors.css");
-
-.l-box {
-	padding: 1em;
-}
-
-.leaflet-top {
-	top: 2.5em;
-}
-
-.map-middle {
-	right: 50%;
-}
-
-#logo {
-	height: auto;
-	width: 6em;
-}
-
-#message .error {
-	font-weight: bold;
-	color: var(--gnuboat-warning);
-}
-
-#message .info {
-	font-weight: bold;
-	color: var(--gnuboat-primary-dark);
-}
-
-.viewportGeometry {
-	width: -webkit-calc(100vw - 3em);
-	width:    -moz-calc(100vw - 3em);
-	width:         calc(100vw - 3em);
-	height: -webkit-calc(100vh - 3em);
-	height:    -moz-calc(100vh - 3em);
-	height:         calc(100vh - 3em);
-}
-
-#mapViewport {
-	border: 1px solid var(--gnuboat-primary-light);
-	margin-top: 1.5em;
-	margin-left: 1.5em;
-	background-color: white;
-}
Index: src/mapservice/src-gen/openapi_server/static/css/side-menu.css
===================================================================
--- src/mapservice/src-gen/openapi_server/static/css/side-menu.css	(revision 28198a1e37a102d2c3b294f60e3e547fb8a2b16d)
+++ 	(revision )
@@ -1,268 +1,0 @@
-/*
-    Copyright (C) 2017 - 2019 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-@import url("GnuBoat.Colors.css");
-
-body {
-    color: #777;
-}
-
-.pure-img-responsive {
-    max-width: 100%;
-    height: auto;
-}
-
-/*
-Add transition to containers so they can push in and out.
-*/
-#layout,
-#menu,
-.menu-link {
-    -webkit-transition: all 0.2s ease-out;
-    -moz-transition: all 0.2s ease-out;
-    -ms-transition: all 0.2s ease-out;
-    -o-transition: all 0.2s ease-out;
-    transition: all 0.2s ease-out;
-}
-
-/*
-This is the parent `<div>` that contains the menu and the content area.
-*/
-#layout {
-    position: relative;
-    left: 0;
-    padding-left: 0;
-}
-    #layout.active #menu {
-        left: 150px;
-        width: 150px;
-    }
-
-    #layout.active .menu-link {
-        left: 150px;
-    }
-/*
-The content `<div>` is where all your content goes.
-*/
-.content {
-    margin: 0 auto;
-    padding: 0 2em;
-    max-width: 800px;
-    margin-bottom: 50px;
-    line-height: 1.6em;
-}
-
-.header {
-     margin: 0;
-     color: #333;
-     text-align: center;
-     padding: 2.5em 2em 0;
-     border-bottom: 1px solid #eee;
- }
-    .header h1 {
-        margin: 0.2em 0;
-        font-size: 3em;
-        font-weight: 300;
-    }
-     .header h2 {
-        font-weight: 300;
-        color: #ccc;
-        padding: 0;
-        margin-top: 0;
-    }
-
-.content-subhead {
-    margin: 50px 0 20px 0;
-    font-weight: 300;
-    color: #888;
-}
-
-
-
-/*
-The `#menu` `<div>` is the parent `<div>` that contains the `.pure-menu` that
-appears on the left side of the page.
-*/
-
-#menu {
-    margin-left: -150px; /* "#menu" width */
-    width: 150px;
-    position: fixed;
-    top: 0;
-    left: 0;
-    bottom: 0;
-    z-index: 2000; /* so the menu or its navicon stays above all content */
-    background: var(--gnuboat-primary-dark);
-    overflow-y: auto;
-    -webkit-overflow-scrolling: touch;
-}
-    /*
-    All anchors inside the menu should be styled like this.
-    */
-    #menu a {
-        color: #fff;
-        border: none;
-        padding: 0.6em 0 0.6em 0.6em;
-    }
-
-    /*
-    Remove all background/borders, since we are applying them to #menu.
-    */
-     #menu .pure-menu,
-     #menu .pure-menu ul {
-        border: none;
-        background: transparent;
-    }
-
-    /*
-    Add that light border to separate items into groups.
-    */
-    #menu .pure-menu ul,
-    #menu .pure-menu .menu-item-divided {
-        border-top: 1px solid var(--gnuboat-primary-light);
-    }
-        /*
-        Change color of the anchor links on hover/focus.
-        */
-        #menu .pure-menu li a:hover,
-        #menu .pure-menu li a:focus {
-            background: var(--gnuboat-primary-light);
-        }
-
-    /*
-    This styles the selected menu item `<li>`.
-    */
-    #menu .pure-menu-selected,
-    #menu .pure-menu-heading {
-        background: var(--gnuboat-secondary-dark);
-    }
-        /*
-        This styles a link within a selected menu item `<li>`.
-        */
-        #menu .pure-menu-selected a {
-            color: #fff;
-        }
-
-    /*
-    This styles the menu heading.
-    */
-    #menu .pure-menu-heading {
-        font-size: 110%;
-        color: #fff;
-        margin: 0;
-    }
-
-/* -- Dynamic Button For Responsive Menu -------------------------------------*/
-
-/*
-The button to open/close the Menu is custom-made and not part of Pure. Here's
-how it works:
-*/
-
-/*
-`.menu-link` represents the responsive menu toggle that shows/hides on
-small screens.
-*/
-.menu-link {
-    position: fixed;
-    display: block; /* show this only on small screens */
-    top: 0;
-    left: 0; /* "#menu width" */
-    background: #000;
-    background: rgba(0,0,0,0.7);
-    font-size: 10px; /* change this value to increase/decrease button size */
-    z-index: 10;
-    width: 2em;
-    height: auto;
-    padding: 2.1em 1.6em;
-	z-index: 1500;
-}
-
-    .menu-link:hover,
-    .menu-link:focus {
-        background: #000;
-    }
-
-    .menu-link span {
-        position: relative;
-        display: block;
-    }
-
-    .menu-link span,
-    .menu-link span:before,
-    .menu-link span:after {
-        background-color: #fff;
-        width: 100%;
-        height: 0.2em;
-    }
-
-        .menu-link span:before,
-        .menu-link span:after {
-            position: absolute;
-            margin-top: -0.6em;
-            content: " ";
-        }
-
-        .menu-link span:after {
-            margin-top: 0.6em;
-        }
-
-
-/* -- Responsive Styles (Media Queries) ------------------------------------- */
-
-/*
-Hides the menu at `48em`, but modify this based on your app's needs.
-*/
-@media (min-width: 99999em) {
-
-    .header,
-    .content {
-        padding-left: 2em;
-        padding-right: 2em;
-    }
-
-    #layout {
-        padding-left: 150px; /* left col width "#menu" */
-        left: 0;
-    }
-    #menu {
-        left: 150px;
-    }
-
-    .menu-link {
-        position: fixed;
-        left: 150px;
-        display: none;
-    }
-
-    #layout.active .menu-link {
-        left: 150px;
-    }
-}
-
-@media (max-width: 99999em) {
-    /* Only apply this when the window is small. Otherwise, the following
-    case results in extra padding on the left:
-        * Make the window small.
-        * Tap the menu to trigger the active state.
-        * Make the window large again.
-    */
-    #layout.active {
-        position: relative;
-        left: 150px;
-    }
-}
Index: src/mapservice/src-gen/openapi_server/static/index.html
===================================================================
--- src/mapservice/src-gen/openapi_server/static/index.html	(revision 28198a1e37a102d2c3b294f60e3e547fb8a2b16d)
+++ 	(revision )
@@ -1,130 +1,0 @@
-<!--
-    Copyright (C) 2016 - 2019 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
--->
-<!DOCTYPE HTML>
-<html>
-	<head profile="http://www.w3.org/2005/10/profile">
-		<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
-		<meta name="viewport" content="width=device-width, initial-scale=1.0">
-		<link rel="icon" type="image/png" href="resources/gnuboat-256-256-transparent.png"/>
-		<title>GNUBoat Web Application</title>
-		
-		<link rel="stylesheet" href="lib/css/pure/pure-min.css" type="text/css"/>
-		<!--[if lte IE 8]>
-		<link rel="stylesheet" content="text/css" href="lib/css/pure/grids-responsive-old-ie-min.css">
-		<![endif]-->
-		<!--[if gt IE 8]><!-->
-		<link rel="stylesheet" content="text/css" href="lib/css/pure/grids-responsive-min.css">
-		<!--<![endif]-->
-		<link rel="stylesheet" content="text/css" href="lib/css/leaflet/leaflet.css"/>
-		
-		<script src="lib/js/jquery-3.2.1.min.js" type="text/javascript"></script>
-		<script src="lib/js/jquery.validate.min.js" type="text/javascript"></script>
-		<script src="lib/js/leaflet.js" type="text/javascript"></script>
-		<!--<script src="lib/js/leaflet.hotline.min.js" type="text/javascript"></script>-->
-		
-		<link rel="stylesheet" href="css/GnuBoat.css" type="text/css"/>
-		<link rel="stylesheet" href="css/side-menu.css" type="text/css"/>
-		<script language="javascript" src="js/GnuBoat.js" type="text/javascript"></script>
-		<script language="javascript" src="js/GnuBoat.Webserver.js" type="text/javascript"></script>
-		<script language="javascript" type="text/javascript">
-			var active = 'active';
-			var layout = null;
-			var menu = null;
-			var menuLink = null;
-			var content = null;
-
-			function toggleAll() {
-				layout.toggleClass(active);
-				menu.toggleClass(active);
-				menuLink.toggleClass(active);
-			}
-
-			$(document).ready(function () {
-				layout   = $("#layout");
-				menu     = $("#menu");
-				menuLink = $("#menuLink");
-				content  = $("#main");
-
-				menuLink.click(function () {
-					toggleAll();
-				});
-
-				content.click(function() {
-					if (menu.hasClass(active)) {
-						toggleAll();
-					}
-				});
-				
-				GnuBoat.Webserver.initialize();
-				GnuBoat.Webserver.setServer("http://localhost:8080/mapservice/v1/");
-			});
-		</script>
-	</head>
-	<body>
-		<div id="layout" class="">
-			<a id="menuLink" class="menu-link" href="#menu"><!-- Hamburger icon --><span></span></a>
-			<div id="menu" class="">
-				<div class="pure-menu">
-					<a class="pure-menu-heading" href="#">GNUBoat</a>
-					<ul class="pure-menu-list">
-						<li class="pure-menu-item"><a id="linkMap" class="pure-menu-link" href="#map">Map</a></li>
-						<li class="pure-menu-item"><a class="pure-menu-link" href="#upload">Upload</a></li>
-						<li class="pure-menu-item"><a id="linkMyGnuboat" class="pure-menu-link" href="#mygnuboat">My GnuBoat</a></li>
-					</ul>
-				</div>
-			</div>
-			<div id="main">
-				<!--<div class="content">-->
-				<a name="map"></a>
-				<div id="mapViewport" class="viewportGeometry">
-					<div class="leaflet-top map-middle">
-						<div class="leaflet-control">
-							<img id="logo" src="resources/gnuboat-256-256-transparent.png" />
-						</div>
-					</div>
-				</div>
-				<!--</div>-->
-				<div class="content">
-					<a name="mygnuboat"></a>
-					<div id="login">
-						<form id="loginForm" class="pure-form pure-form-aligned">
-							<fieldset>
-								<legend>Login</legend>
-								<div class="pure-control-group">
-									<label for="loginUsername">Username:</label>
-									<input id="loginUsername" type="text" name="loginUsername" value="" required>
-								</div>
-								<div class="pure-control-group">
-									<label for="loginPassword">Password:</label>
-									<input id="loginPassword" type="password" name="loginPassword" value="" required>
-								</div>
-								<input type="submit" class="pure-button pure-button-primary" name="loginButton" value="Login"/>
-							</fieldset>
-						</form>
-					</div>
-					<div id="myWaters">
-						<h2 class="content-subhead">My Waters</h2>
-						<form id="myWatersForm" class="pure-form">
-							<div class="pure-control-group">
-								<select id="myWatersSelect" class="pure-input-1"></select>
-							</div>
-						</form>
-					</div>
-				</div>
-			</div>
-	</body>
-</html>
Index: src/mapservice/src-gen/openapi_server/static/js/GnuBoat.Webserver.js
===================================================================
--- src/mapservice/src-gen/openapi_server/static/js/GnuBoat.Webserver.js	(revision 28198a1e37a102d2c3b294f60e3e547fb8a2b16d)
+++ 	(revision )
@@ -1,143 +1,0 @@
-/*
-
-    Copyright (C) 2018 - 2019 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-
-*/
-
-/** @namespace GnuBoat JavaScript namespace */
-var GnuBoat = GnuBoat || {};
-/** @namespace GnuBoat Webserver JavaScript namespace */
-GnuBoat.Webserver = GnuBoat.Webserver || {};
-
-GnuBoat.Webserver.initialize = function()
-{
-	GnuBoat.Webserver.private.mapSetup();
-	$("#loginForm").validate({
-		rules: {
-			loginUsername: {
-				required: true
-			},
-			loginPassword: {
-				required: true
-			}
-		},
-		submitHandler: function(form){
-			GnuBoat.Webserver.login(form);
-		}
-	});
-	
-	$("#login").hide();
-	$("#myWaters").hide();
-	$("#linkMyGnuboat").click(function(){ $("#mapViewport").hide(); GnuBoat.Webserver.loginCheck(); });
-	$("#linkMap").click(function(){ $("#mapViewport").show(); });
-}
-
-/**
- * @brief Sets the webservice base url, used by any other functions
- */
-GnuBoat.Webserver.setServer = function(baseUrl)
-{
-	if(baseUrl.slice(-1) != "/")
-		baseUrl += "/";
-	GnuBoat.Webserver.private.serverBaseUrl = baseUrl;
-}
-
-GnuBoat.Webserver.private = {
-	loggedin: false,
-	map: null,
-	mapSetup: function ()
-	{
-		GnuBoat.Webserver.private.map = L.map('mapViewport').setView([48.43, 10.04], 17);
-		
-		var layer_openstreetmap = L.tileLayer(
-			'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
-			{ attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>, <a href="http://www.openseamap.org">OpenSeaMap</a>, <a href="http://gnuboat.engsas.de">GNUBoat</a> contributors'}
-		).addTo(GnuBoat.Webserver.private.map);
-		var layer_openseamap = L.tileLayer(
-			'http://tiles.openseamap.org/seamark/{z}/{x}/{y}.png',
-			{attribute: '&copy; <a href="http://www.openseamap.org">OpenSeaMap</a> contributors'}
-		).addTo(GnuBoat.Webserver.private.map);
-		
-		// add GNUBoat layers
-		var layer_gnuboat_accuracy_low = L.tileLayer(
-			'./tiles/gnuboat_10_100/{z}/{x}/{y}.png',
-			{tms: true, opacity: 0.5, zIndex: 98, attribute: '&copy; <a href="http://gnuboat.engsas.de">GNUBoat</a> contributors'}
-		);
-		var layer_gnuboat_accuracy_high = L.tileLayer(
-			'./tiles/gnuboat_100_100/{z}/{x}/{y}.png',
-			{tms: true, opacity: 0.5, zIndex: 98, attribute: '&copy; <a href="http://gnuboat.engsas.de">GNUBoat</a> contributors'}
-		).addTo(GnuBoat.Webserver.private.map);
-		
-		// add layer control
-		var baselayers = {
-			"Map": layer_openstreetmap,
-		};
-		// overlays
-		var overlays = {"Seamarks": layer_openseamap,
-			"GNUBoat Low Accuracy": layer_gnuboat_accuracy_low,
-			"GNUBoat High Accuracy": layer_gnuboat_accuracy_high,
-		};
-		GnuBoat.Webserver.private.mapControl = L.control.layers(
-			baselayers, overlays,
-			{hideSingleBase: true, sortLayers: true, }
-		).addTo(GnuBoat.Webserver.private.map);
-		
-		// add scale
-		L.control.scale().addTo(GnuBoat.Webserver.private.map);
-	}
-};
-
-GnuBoat.Webserver.login = function(form)
-{
-	Cookies.set('username', $("#loginUsername").val());
-	Cookies.set('password', $("#loginPassword").val());
-	GnuBoat.Webserver.private.loggedin = false;
-	
-	// getting my waters
-	$.ajax({
-		dataType: "json",
-		url: GnuBoat.Webserver.private.serverBaseUrl +'waters?manager='+ encodeURIComponent(Cookies.get('username')),
-	}).done(function(data) {
-		GnuBoat.Webserver.private.loggedin = true;
-		GnuBoat.Webserver.loginCheck();
-		
-		$("#myWatersDiv").empty();
-		if(data.length < 1){
-			$("<p>No Waters found!</p>").appendTo("#myWatersDiv");
-		}
-		else{
-			$('<select id="myWatersSelect" class="pure-input-1"></select>').appendTo("#myWatersDiv");
-			data.forEach(function(value, index){
-				$("<option value=\""+ value.water_id +"\">"+ value.name +"</option>").appendTo("#myWatersSelect");
-			})
-		}
-		$("#myWaters").show();
-	}).fail(function() {
-		alert('request failed');
-	});
-};
-
-GnuBoat.Webserver.loginCheck = function()
-{
-	console.log([Cookies.get('username'), Cookies.get('username') == undefined, Cookies.get('password'), Cookies.get('password') == undefined, GnuBoat.Webserver.private.loggedin]);
-	if(Cookies.get('username') == undefined || Cookies.get('password') == undefined || !GnuBoat.Webserver.private.loggedin){
-		$("#login").show();
-		return;
-	}
-	$("#login").hide();
-};
Index: src/mapservice/src-gen/openapi_server/static/js/GnuBoat.js
===================================================================
--- src/mapservice/src-gen/openapi_server/static/js/GnuBoat.js	(revision 28198a1e37a102d2c3b294f60e3e547fb8a2b16d)
+++ 	(revision )
@@ -1,33 +1,0 @@
-/*
-
-    Copyright (C) 2016 - 2018 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-
-*/
-
-/** @namespace GnuBoat JavaScript namespace */
-var GnuBoat = GnuBoat || {};
-
-/**
- * @brief Used to display user messages
- */
-GnuBoat.displayMessage = function(text)
-{
-	$("#message").empty();
-	$(text).appendTo("#message");
-	location.hash = "#messages";
-}
Index: src/mapservice/src-gen/openapi_server/templates/index.html
===================================================================
--- src/mapservice/src-gen/openapi_server/templates/index.html	(revision 28198a1e37a102d2c3b294f60e3e547fb8a2b16d)
+++ 	(revision )
@@ -1,131 +1,0 @@
-<!--
-    Copyright (C) 2016 - 2019 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
--->
-<!DOCTYPE HTML>
-<html>
-	<head profile="http://www.w3.org/2005/10/profile">
-		<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
-		<meta name="viewport" content="width=device-width, initial-scale=1.0">
-		<link rel="icon" type="image/png" href="{{ url_for('static', filename = 'resources/gnuboat-256-256-transparent.png') }}"/>
-		<title>GNUBoat Web Application</title>
-		
-		<link rel="stylesheet" href="{{ url_for('static', filename = 'lib/css/pure/pure-min.css') }}" type="text/css"/>
-		<!--[if lte IE 8]>
-		<link rel="stylesheet" content="text/css" href="lib/css/pure/grids-responsive-old-ie-min.css">
-		<![endif]-->
-		<!--[if gt IE 8]><!-->
-		<link rel="stylesheet" content="text/css" href="{{ url_for('static', filename = 'lib/css/pure/grids-responsive-min.css') }}">
-		<!--<![endif]-->
-		<link rel="stylesheet" content="text/css" href="{{ url_for('static', filename = 'lib/css/leaflet/leaflet.css') }}"/>
-		
-		<script src="{{ url_for('static', filename = 'lib/js/jquery-3.2.1.min.js') }}" type="text/javascript"></script>
-		<script src="{{ url_for('static', filename = 'lib/js/jquery.validate.min.js') }}" type="text/javascript"></script>
-		<script src="{{ url_for('static', filename = 'lib/js/leaflet.js') }}" type="text/javascript"></script>
-		<script src="{{ url_for('static', filename = 'lib/js/js.cookie.js') }}"></script>
-		<!--<script src="lib/js/leaflet.hotline.min.js" type="text/javascript"></script>-->
-		
-		<link rel="stylesheet" href="{{ url_for('static', filename = 'css/GnuBoat.css') }}" type="text/css"/>
-		<link rel="stylesheet" href="{{ url_for('static', filename = 'css/side-menu.css') }}" type="text/css"/>
-		<script language="javascript" src="{{ url_for('static', filename = 'js/GnuBoat.js') }}" type="text/javascript"></script>
-		<script language="javascript" src="{{ url_for('static', filename = 'js/GnuBoat.Webserver.js') }}" type="text/javascript"></script>
-		<script language="javascript" type="text/javascript">
-			var active = 'active';
-			var layout = null;
-			var menu = null;
-			var menuLink = null;
-			var content = null;
-
-			function toggleAll() {
-				layout.toggleClass(active);
-				menu.toggleClass(active);
-				menuLink.toggleClass(active);
-			}
-
-			$(document).ready(function () {
-				layout   = $("#layout");
-				menu     = $("#menu");
-				menuLink = $("#menuLink");
-				content  = $("#main");
-
-				menuLink.click(function () {
-					toggleAll();
-				});
-
-				content.click(function() {
-					if (menu.hasClass(active)) {
-						toggleAll();
-					}
-				});
-				
-				GnuBoat.Webserver.initialize();
-				GnuBoat.Webserver.setServer("v1/");
-			});
-		</script>
-	</head>
-	<body>
-		<div id="layout" class="">
-			<a id="menuLink" class="menu-link" href="#menu"><!-- Hamburger icon --><span></span></a>
-			<div id="menu" class="">
-				<div class="pure-menu">
-					<a class="pure-menu-heading" href="#">GNUBoat</a>
-					<ul class="pure-menu-list">
-						<li class="pure-menu-item"><a id="linkMap" class="pure-menu-link" href="#map">Map</a></li>
-						<li class="pure-menu-item"><a class="pure-menu-link" href="#upload">Upload</a></li>
-						<li class="pure-menu-item"><a id="linkMyGnuboat" class="pure-menu-link" href="#mygnuboat">My GnuBoat</a></li>
-					</ul>
-				</div>
-			</div>
-			<div id="main">
-				<!--<div class="content">-->
-				<a name="map"></a>
-				<div id="mapViewport" class="viewportGeometry">
-					<div class="leaflet-top map-middle">
-						<div class="leaflet-control">
-							<img id="logo" src="{{ url_for('static', filename = 'resources/gnuboat-256-256-transparent.png') }}" />
-						</div>
-					</div>
-				</div>
-				<!--</div>-->
-				<div class="content">
-					<a name="mygnuboat"></a>
-					<div id="login">
-						<form id="loginForm" class="pure-form pure-form-aligned">
-							<fieldset>
-								<legend>Login</legend>
-								<div class="pure-control-group">
-									<label for="loginUsername">Username:</label>
-									<input id="loginUsername" type="text" name="loginUsername" value="" required>
-								</div>
-								<div class="pure-control-group">
-									<label for="loginPassword">Password:</label>
-									<input id="loginPassword" type="password" name="loginPassword" value="" required>
-								</div>
-								<input type="submit" class="pure-button pure-button-primary" name="loginButton" value="Login"/>
-							</fieldset>
-						</form>
-					</div>
-					<div id="myWaters">
-						<h2 class="content-subhead">My Waters</h2>
-						<form id="myWatersForm" class="pure-form">
-							<div id="myWatersDiv" class="pure-control-group">
-								
-							</div>
-						</form>
-					</div>
-				</div>
-			</div>
-	</body>
-</html>
Index: src/mapservice/src-gen/openapi_server/test/test_waters_controller.py
===================================================================
--- src/mapservice/src-gen/openapi_server/test/test_waters_controller.py	(revision 28198a1e37a102d2c3b294f60e3e547fb8a2b16d)
+++ src/mapservice/src-gen/openapi_server/test/test_waters_controller.py	(revision 13cbe66f44f250d5e3f76cda11e899f528e510df)
@@ -7,4 +7,6 @@
 from six import BytesIO
 
+from openapi_server.models.gauge import Gauge  # noqa: E501
+from openapi_server.models.gauge_creation import GaugeCreation  # noqa: E501
 from openapi_server.models.http_error import HttpError  # noqa: E501
 from openapi_server.models.water import Water  # noqa: E501
@@ -16,18 +18,4 @@
     """WatersController integration test stubs"""
 
-    def test_water_get_by_id(self):
-        """Test case for water_get_by_id
-
-        Represents a water
-        """
-        headers = { 
-        }
-        response = self.client.open(
-            '/mapservice/v1/waters/{id}'.format(id='56'),
-            method='GET',
-            headers=headers)
-        self.assert200(response,
-                       'Response body is : ' + response.data.decode('utf-8'))
-
     def test_waters_create(self):
         """Test case for waters_create
@@ -35,8 +23,13 @@
         Add a new water
         """
-        water_creation = WaterCreation()
+        water_creation = {
+  "osmId" : 0,
+  "name" : "name"
+}
         headers = { 
+            'Accept': 'application/json',
+            'Content-Type': 'application/json',
             'X-API-KEY': 'test_key',
-            
+            'Authorization': 'BasicZm9vOmJhcg==',
         }
         response = self.client.open(
@@ -46,4 +39,65 @@
             data=json.dumps(water_creation),
             content_type='application/json')
+        self.assert200(response,
+                       'Response body is : ' + response.data.decode('utf-8'))
+
+    def test_waters_gauge_create(self):
+        """Test case for waters_gauge_create
+
+        Add a new water
+        """
+        gauge_creation = {
+  "name" : "name",
+  "location" : [ 0.8008281904610115, 0.8008281904610115 ],
+  "comment" : "comment"
+}
+        headers = { 
+            'Accept': 'application/json',
+            'Content-Type': 'application/json',
+            'X-API-KEY': 'test_key',
+            'Authorization': 'BasicZm9vOmJhcg==',
+        }
+        response = self.client.open(
+            '/mapservice/v1/waters/{water_id}/gauges'.format(water_id='56'),
+            method='POST',
+            headers=headers,
+            data=json.dumps(gauge_creation),
+            content_type='application/json')
+        self.assert200(response,
+                       'Response body is : ' + response.data.decode('utf-8'))
+
+    def test_waters_gauge_get_by_id(self):
+        """Test case for waters_gauge_get_by_id
+
+        Represents a gauge
+        """
+        headers = { 
+            'Accept': 'application/json',
+        }
+        response = self.client.open(
+            '/mapservice/v1/waters/{water_id}/gauges/{gauge_id}'.format(water_id='56', gauge_id='56'),
+            method='GET',
+            headers=headers)
+        self.assert200(response,
+                       'Response body is : ' + response.data.decode('utf-8'))
+
+    def test_waters_gauges_get(self):
+        """Test case for waters_gauges_get
+
+        Find gauges of water waterId by gaugeId
+        """
+        query_string = [('name', 'Missi'),
+                        ('manager', 'jane'),
+                        ('order_by', 'name'),
+                        ('offset', '0'),
+                        ('limit', '10')]
+        headers = { 
+            'Accept': 'application/json',
+        }
+        response = self.client.open(
+            '/mapservice/v1/waters/{water_id}/gauges'.format(water_id='56'),
+            method='GET',
+            headers=headers,
+            query_string=query_string)
         self.assert200(response,
                        'Response body is : ' + response.data.decode('utf-8'))
@@ -60,4 +114,5 @@
                         ('limit', '10')]
         headers = { 
+            'Accept': 'application/json',
         }
         response = self.client.open(
@@ -69,4 +124,19 @@
                        'Response body is : ' + response.data.decode('utf-8'))
 
+    def test_waters_get_by_id(self):
+        """Test case for waters_get_by_id
+
+        Represents a water
+        """
+        headers = { 
+            'Accept': 'application/json',
+        }
+        response = self.client.open(
+            '/mapservice/v1/waters/{id}'.format(id='56'),
+            method='GET',
+            headers=headers)
+        self.assert200(response,
+                       'Response body is : ' + response.data.decode('utf-8'))
+
 
 if __name__ == '__main__':
Index: src/mapservice/src-gen/requirements.txt
===================================================================
--- src/mapservice/src-gen/requirements.txt	(revision 28198a1e37a102d2c3b294f60e3e547fb8a2b16d)
+++ src/mapservice/src-gen/requirements.txt	(revision 13cbe66f44f250d5e3f76cda11e899f528e510df)
@@ -1,3 +1,3 @@
-connexion == 2.0.2
+connexion == 2.2.0
 swagger-ui-bundle == 0.0.2
 python_dateutil == 2.6.0
@@ -5,2 +5,3 @@
 flask-sqlalchemy
 flask-cors
+shapely
Index: src/mapservice/src/server_impl/controllers/WatersController.py
===================================================================
--- src/mapservice/src/server_impl/controllers/WatersController.py	(revision 28198a1e37a102d2c3b294f60e3e547fb8a2b16d)
+++ src/mapservice/src/server_impl/controllers/WatersController.py	(revision 13cbe66f44f250d5e3f76cda11e899f528e510df)
@@ -17,5 +17,5 @@
 import connexion
 
-from ..database.Model import User, Water, db
+from ..database.Model import User, Water, Gauge, db
 from ..HttpErrors import BadRequest, Unauthorized, NotFound
 from .UsersController import loggedin_user
@@ -47,5 +47,5 @@
 	return result
 
-def water_get_by_id(id):
+def waters_get_by_id(id):
 	water = Water.query.filter_by(id=id).all()
 	if len(water) != 1:
@@ -62,2 +62,63 @@
 	db.session.commit()
 	return water.to_dict()
+
+def waters_gauge_get_by_id(water_id, gauge_id):
+	water = Water.query.filter_by(id=water_id).all()
+	if len(water) != 1:
+		return BadRequest
+	water = water[0]
+
+	gauge = Gauge.query.filter_by(water=water).filter_by(id=gauge_id).all()
+	print(connexion.request.headers['Accept'])
+	if len(gauge) != 1:
+		return NotFound
+	if connexion.request.headers['Accept'] == "application/geo+json":
+		return gauge[0].to_geojson(), 200, {'Content-Type': 'application/geo+json; charset=utf-8'}
+	return gauge[0].to_dict()
+
+
+def waters_gauge_create(water_id, gauge_creation):
+	user = loggedin_user()
+	if user is None:
+		return Unauthorized
+	
+	water = Water.query.filter_by(id=water_id).all()
+	if len(water) != 1:
+		return BadRequest
+	water = water[0]
+	
+	location = 'SRID=4326;POINT({:.6} {:.6})'.format(gauge_creation.location[0], gauge_creation.location[1])
+	gauge = Gauge(name=gauge_creation.name, manager=user, water=water, location=location, comment=gauge_creation.comment)
+	db.session.add(gauge)
+	db.session.commit()
+	return gauge.to_dict()
+
+def waters_gauges_get(water_id, name, manager, order_by, offset, limit):
+	water = Water.query.filter_by(id=water_id).all()
+	if len(water) != 1:
+		return BadRequest
+	
+	query = None
+	
+	if manager is not None:
+		manager = User.query.filter_by(username=manager).all()
+		if len(manager) != 1:
+			return NotFound
+		manager = manager[0]
+
+	query = Gauge.query.filter_by(id=water_id)
+	if manager is not None:
+		if manager and name is not None:
+			query = query.filter_by(manager = manager).filter(Gauge.name.like('%{}%'.format(name)))
+		elif manager:
+			query = query.filter_by(manager = manager)
+	elif name is not None:
+		query = query.filter(Gauge.name.like('%{}%'.format(name)))
+	
+	result = []
+	for gauge in query.offset(offset).limit(limit):
+		if connexion.request.headers['Accept'] == "application/geo+json":
+			result.append(gauge.to_geojson())
+		else:
+			result.append(gauge.to_dict())
+	return result
Index: src/mapservice/src/server_impl/database/Model.py
===================================================================
--- src/mapservice/src/server_impl/database/Model.py	(revision 28198a1e37a102d2c3b294f60e3e547fb8a2b16d)
+++ src/mapservice/src/server_impl/database/Model.py	(revision 13cbe66f44f250d5e3f76cda11e899f528e510df)
@@ -17,5 +17,8 @@
 import flask
 from flask_sqlalchemy import SQLAlchemy
-from sqlalchemy import inspect, text, Enum
+from sqlalchemy import inspect, text, Enum, event, select, func
+from geoalchemy2 import Geometry
+from geoalchemy2.shape import to_shape
+from shapely import wkb
 import hashlib
 import datetime
@@ -78,5 +81,5 @@
 	id = db.Column(db.Integer, primary_key=True, autoincrement=True)
 	user_id = db.Column(db.BigInteger, db.ForeignKey('users.id'))
-	key = db.Column(db.String(255), nullable=False)
+	key = db.Column(db.String(255), nullable=False, unique=True)
 	user = db.relationship("User", backref=db.backref("apikeys"), lazy=True)
 	
@@ -99,22 +102,63 @@
 		if obj.osm_type:
 			result['osmType'] = obj.osm_type.name
-		return result
-
-#class Gauge(db.Model):
-	#__tablename__ = "gauges"
-	
-	#id = db.Column(db.Integer, primary_key=True, autoincrement=True)
-	#name = db.Column(db.String(255), nullable=False)
-	#manager_id = db.Column(db.Integer, db.ForeignKey('users.id'))
-	#location = POINT
-	#water_id = db.Column(db.Integer, db.ForeignKey('waters.id'))
-	#comment = db.Column(db.String(255))
+		if obj.gauges:
+			result['gauges'] = []
+			for gauge in obj.gauges:
+				result['gauges'].append(gauge.to_dict())
+		return result
+	
+class Gauge(db.Model):
+	__tablename__ = "gauges"
+	
+	id = db.Column(db.Integer, primary_key=True, autoincrement=True)
+	name = db.Column(db.String(255), nullable=False)
+	manager_id = db.Column(db.Integer, db.ForeignKey('users.id'))
+	water_id = db.Column(db.Integer, db.ForeignKey('waters.id'))
+	# POINT(Lon Lat)
+	location = db.Column(Geometry(geometry_type='POINT', srid=4326, management=True))
+	comment = db.Column(db.String(255))
 	#osm_id = db.Column(db.Integer)
 	#osm_type = db.Column(db.String(255))
 	#osm_class = db.Column(db.String(255))
-	#manager = db.relationship("User", backref=db.backref("users", order_by=username), lazy=True)
-	#waters = db.relationship("Water", backref=db.backref("waters", order_by=label), lazy=True)
+	manager = db.relationship("User", backref=db.backref("gauges"), lazy=True)
+	water = db.relationship("Water", backref=db.backref("gauges"), lazy=True)
+	
+	def to_dict(obj):
+		result = { 'gaugeId': obj.id, 'name': obj.name }
+		if obj.manager:
+			result['manager'] = obj.manager.username
+		location = Gauge.wkb_to_dict(obj.location)
+		result['location'] = [location['longitude'], location['latitude']]
+		if obj.comment:
+			result['comment'] = obj.comment
+		return result
+	
+	def to_geojson(obj):
+		location = Gauge.wkb_to_dict(obj.location)
+		result = {
+			'type': 'Feature',
+			'geometry': {
+				'type': 'Point',
+				'coordinates': [location['longitude'], location['latitude']]
+			},
+			'properties': {
+				'name': obj.name
+			}
+		}
+		if obj.manager:
+			result['properties']['manager'] = obj.manager.username
+		if obj.comment:
+			result['properties']['comment'] = obj.comment
+		return result
+	
+	def wkb_to_dict(wkbelement):
+		point = to_shape(wkbelement)
+		return {'longitude': point.x, 'latitude': point.y}
 
 def db_test_setup():
+	if 'sqlite' in flask.current_app.config['SQLALCHEMY_DATABASE_URI']:
+		print("Initiate spatial meta data for Spatialite...")
+		db.engine.execute(select([func.InitSpatialMetaData()]))
+		print("...Finished")
 	db.create_all()
 	
@@ -122,14 +166,28 @@
 		print("CREATING DATABASE TEST CONTENT")
 		with db.session.no_autoflush:
-			test_user_john = User.factory('john', 'testpass2', 'john@example.org')
-			test_user_john.activation_code = 'dac9630aec642a428cd73f4be0a03569'
-			
-			test_user_jane = User.factory('jane', 'testpass', 'jane@example.org')
-			test_user_jane.activated = True
-			test_user_jane.first_name = 'Jane'
+			test_user_john = None
+			query = User.query.filter_by(username='john').all()
+			if len(query) == 1:
+				test_user_john = query[0]
+			else:
+				test_user_john = User.factory('john', 'testpass2', 'john@example.org')
+				test_user_john.activation_code = 'dac9630aec642a428cd73f4be0a03569'
+				db.session.add(test_user_john)
+				db.session.commit()
+			
+			test_user_jane = None
+			query = User.query.filter_by(username='jane').all()
+			if len(query) == 1:
+				test_user_jane = query[0]
+			else:
+				test_user_jane = User.factory('jane', 'testpass', 'jane@example.org')
+				test_user_jane.activated = True
+				test_user_jane.first_name = 'Jane'
+				db.session.add(test_user_jane)
+				db.session.commit()
 			
 			test_key_del = ApiKey(user=test_user_jane, key='DelApiKey4711')
-			db.session.add(test_key_del)
-			
+			if len(ApiKey.query.filter_by(key='DelApiKey4711').all()) < 1:
+				db.session.add(test_key_del)
 			if len(ApiKey.query.filter_by(key='test_key').all()) < 1:
 				test_key = ApiKey(user=test_user_jane, key='test_key')
@@ -138,10 +196,20 @@
 				test_key = ApiKey(user=test_user_jane, key='ApiKey4712')
 				db.session.add(test_key)
-			if len(Water.query.filter_by(name='Mississippi').all()) < 1:
+			mississippi = None
+			query = Water.query.filter_by(name='Mississippi').all()
+			if len(query) == 1:
+				mississippi = query[0]
+			else:
 				mississippi = Water(name='Mississippi', manager=test_user_jane, osm_id=1756854, osm_type=OsmType.Relation)
 				db.session.add(mississippi)
+				db.session.commit()
+			
 			if len(Water.query.filter_by(name='Forggensee').all()) < 1:
-                                mississippi = Water(name='Forggensee', manager=test_user_john, osm_id=897899, osm_type=OsmType.Relation)
-                                db.session.add(mississippi)
+				forggensee = Water(name='Forggensee', manager=test_user_john, osm_id=897899, osm_type=OsmType.Relation)
+				db.session.add(forggensee)
+                                
+			if len(Gauge.query.filter_by(name='New Orleans').all()) < 1:
+				new_orleans = Gauge(name='New Orleans', manager=test_user_jane, water=mississippi, location='SRID=4326;POINT(-90.136111 29.934722)')
+				db.session.add(new_orleans)
 			db.session.commit()
 
