This Masterportal addon provides a feature for searching german waterways and segments of waterways. The search is based on the service BWaStr-Locator.
This addon works with Masterportal version 3.
- Pull and copy addon code into the addons folder (./addons) of your Masterportal instance.
- Activate addon by adding configuration sections in addonsConf.json and config.js.
- 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
{
"bWastrLocator": {
"type": "tool"
},
...
}
const Config = {
...
addons: ["bWaStrLocator", ...]
...
}
{
"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
},
...
]
]
}
}
}
| 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. |
- Select tool Bundeswasserstraßen Locator in Masterportal's menu.
- Type in name or id of a waterway (i.e. "Rhein", "4001").
- Select an entry from search results.
- Adjust parameters from-km and to-km (optional). Use number format "123.45".
- Click button "Show waterway" to display waterway/segment in the map.
- Click button "Reset waterway" to remove waterway/segment from the map.
After installation the addon is accessible by an item in one of Masterportal menus (main menu or tool menu).
Searching german waterways and segments by name, id (id: Bundeswasserstraßen-Identnummer), from-kilometer, to-kilometer
Displaying waterways or segments in map (transformation from linear referenced waterways to geographic coordinates)


