Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BWaStr-Locator addon for Masterportal v3

License: MIT version

This Masterportal addon provides a feature for searching german waterways and segments of waterways. The search is based on the service BWaStr-Locator.

Prerequisites

This addon works with Masterportal version 3.

How to add this addon to your Masterportal configuration

  1. Pull and copy addon code into the addons folder (./addons) of your Masterportal instance.
  2. Activate addon by adding configuration sections in addonsConf.json and config.js.
  3. Add addon as an item to Masterportal's tools menu by editing config.json.

For more information about using and developing addons see Masterportal's developer documentation

addonsConf.json

{
  "bWastrLocator": {
    "type": "tool"
  },
  ...
}

config.js

const Config = {
  ...
  addons: ["bWaStrLocator", ...]
  ...
}

config.json

{
  "portalConfig": {
    ...
    "mainMenu": {
      "sections": [
        [
          {
            "type": "bWaStrLocator",
            "wsQueryAPI": "https://via.bund.de/wsv/bwastr-locator/rest/bwastrinfo/query",
            "geocodingQueryAPI": "https://via.bund.de/wsv/bwastr-locator/rest/geokodierung/query",
            "wkId": 25833,
            "searchField": "all",
            "maxZoom": 12
          },
          ...
        ]
      ]
    }
  }
}

Configuration parameter in config.json

Parameter Default Description
wsQueryAPI https://via.bund.de/wsv/bwastr-locator/rest/bwastrinfo/query (String) URL of the public REST API of service BWaStr Locator (bwastrinfo)
geocodingQueryAPI https://via.bund.de/wsv/bwastr-locator/rest/geokodierung/query (String) URL of the public REST API of service BWaStr Locator (geocoding)
searchField all (String) Search field. Available values: "all" (default), "bwastrid", "bwastr_name", "strecken_name". For more information see documentation of BWaStr-Locator-REST-API.
wkId 25832 (Number) Spatial reference system (EPSG code) to use for displaying geometries (i.e. 25833)
maxZoom 12 (Number) Maximal zoom when focus on selected waterway.

How to use it

  1. Select tool Bundeswasserstraßen Locator in Masterportal's menu.
  2. Type in name or id of a waterway (i.e. "Rhein", "4001").
  3. Select an entry from search results.
  4. Adjust parameters from-km and to-km (optional). Use number format "123.45".
  5. Click button "Show waterway" to display waterway/segment in the map.
  6. Click button "Reset waterway" to remove waterway/segment from the map.

Features

Menu item for BWaStr-Locator

After installation the addon is accessible by an item in one of Masterportal menus (main menu or tool menu).

image info

Search waterways

Searching german waterways and segments by name, id (id: Bundeswasserstraßen-Identnummer), from-kilometer, to-kilometer

image info

Geolocate waterways

Displaying waterways or segments in map (transformation from linear referenced waterways to geographic coordinates)

image info

About

BWaStr.-Locator AddOn for Masterportal v3

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages