Usage | 7. Settings and constants

This notebook explains how to change settings and constants for advanced use, to configure operational details of GrowBikeNet.

Modules covered: settings, bnl.osm, constants

Settings

The function gbn.growbikenet() is run with several parameters, which are the main “operational settings”. However, there is a longer list of optional settings that can be tuned for maximal configurability. To change a setting settingname to newsettingvalue, do the following before running gbn.growbikenet(): gbn.settings.settingname = newsettingvalue. The correctness of some settings is checked automatically, but not all of them. If you experience strange results or errors, double-check your set settings.

Find the settings here: User reference

OSM constants

These are global constants provided by BikeNetLib (bnl) related to OpenStreetMap (OSM), such as the definition of the bicycle network. These are meant for advanced users only who have a good understanding of OSM tags. To change an OSM constant constantname to newconstantvalue, do the following before running gbn.growbikenet():

import bikenetlib as bnl
bnl.osm.constantname = newconstantvalue

The correctness of constants is not checked automatically, so if you experience strange results or errors, double-check your set OSM constants.

Find the OSM constants in BikeNetLib’s docs pages.

Constants

These are global constants for GrowBikeNet that can be tweaked during development, but should not be changed later by the user. The most technical or internal constants start with an underscore. GrowBikeNet still makes them configurable, for maximal configurability. To change a constant constantname to newconstantvalue, do the following before running gbn.growbikenet(): gbn.constants.constantname = newconstantvalue. The correctness of constants is not checked automatically, so if you experience strange results or errors, double-check your set constants.

Find the constants here: Developer reference