Package Documentation
Storm Package: synapse-nominatim
The following Commands are available from this package. This documentation is generated for version 3.0.0 of the package.
Storm Commands
This package implements the following Storm Commands.
nominatim.config.add
Add a Synapse-Nominatim configuration.
Examples:
// Add a global configuration
nominatim.config.add myglobal https://foo.com
// Add a configuration for the current user
nominatim.config.add myconfig https://foo.com --scope self
Usage: nominatim.config.add [options] <name> <url>
Options:
--help : Display the command usage.
--ssl-noverify : Do not perform SSL/TLS verification.
--proxy <proxy> : Set whether to use a configured proxy. Default uses cortex proxy if defined. (default:
None)
--scope <scope> : Set the scope on the configuration. (default: global, choices: global, self, unscoped)
Arguments:
<name> : A unique name for the Nominatim configuration.
<url> : The Nominatim API URL string.
nominatim.config.del
Delete a Synapse-Nominatim configuration.
Examples:
// Delete the "myconfig" configuration
nominatim.config.del myconfig
Usage: nominatim.config.del [options] <name>
Options:
--help : Display the command usage.
Arguments:
<name> : The name of the Nominatim configuration.
nominatim.config.list
Display the list of Nominatim configurations you have access to.
Usage: nominatim.config.list [options]
Options:
--help : Display the command usage.
nominatim.config.show
Show the details of a Synapse-Nominatim configuration.
Examples:
// Show the in-use configuration for the current user
nominatim.config.show
// Show a configuration by name
nominatim.config.show myconfig
Usage: nominatim.config.show [options] <name>
Options:
--help : Display the command usage.
Arguments:
[name] : The name for the Nominatim configuration.
nominatim.config.update
Update the configuration of an existing Synapse-Nominatim configuration.
Examples:
// Set the permission level for user "myuser" to "admin" on the "myconfig"
// configuration
nominatim.config.update myconfig --perm user myuser admin
// Set the permission level for the "all" role to "deny" on the
// "myconfig" configuration
nominatim.config.update myconfig --perm role all deny
// Do not verify the SSL certificate when connecting to "myconfig"
nominatim.config.update myconfig --ssl-verify $lib.false
// Change the name of the "myconfig" configuration to "otherconfig"
nominatim.config.update myconfig --name otherconfig
Usage: nominatim.config.update [options] <config>
Options:
--help : Display the command usage.
--url <url> : The Nominatim API URL string. (default: None)
--perm <perm> : Set the permission level for a user or role on this Nominatim configuration.
Arguments to this option are ``scope``, ``name``,
``level``:
<scope>: The scope for the permission, either
"user" or "role".
<name> : The user/role name depending on scope.
<level>: The $lib.auth.easyperm.level, or
$lib.null to remove the permission.
--ssl-verify <ssl_verify> : Set whether to verify the SSL certificate of the Nominatim endpoint. (default: None)
--proxy <proxy> : Set whether to use a configured proxy. Default uses cortex proxy if defined. (default:
None)
--name <name> : New name for the Nominatim configuration. (default: None)
Arguments:
<config> : The name for the Nominatim configuration to modify.
nominatim.enrich
Enrich nodes with location data from Nominatim.
This command uses the :latlong property of inbound nodes to perform a reverse
geocoding query with Nominatim.
Results from the query are used to create geo:place nodes.
For inbound geo:place nodes where the guid generated from the result of the query
matches the inbound node, the :loc and :address properties are updated on the inbound
node and no new nodes are created. If the guid does not match, a new geo:place node
is created, and a -(contains)> edge of the inbound node is set to the newly created
node.
For all other inbound node types, a geo:place node is created for the result, the
:place property of the inbound node is set to the value of the newly created
geo:place node, and the :loc property of the inbound node is updated.
The --language argument sets the preferred language order for showing results.
The value may either be a simple comma-separated list of language codes or have the same
values as the browser Accept-Language HTTP header. The Nominatim API will use the value(s)
to determine the correct language. Basic language values are typically represented by two
characters. Location-specific values are expressed in a two part format, indicating
the language and the country where this version of the language is used.
Examples:
// Create an example inet:ipv4 node with a :latlong property and enrich it.
[ inet:ipv4=1.2.3.4 :latlong=(43.740070,7.426644) ]
inet:ipv4=1.2.3.4 | nominatim.enrich
// Lift 5 geo place nodes and enrich them
geo:place | limit 5 | nominatim.enrich
Usage: nominatim.enrich [options]
Options:
--help : Display the command usage.
--debug : Show verbose debug output.
--yield : Yield the newly created nodes.
--language <language> : The default accept-language for the endpoint (see description for more info).
--config <config> : Override the default config with the provided name.
nominatim.search
Search Nominatim for places.
This command takes a free-form query string to search for. Free-form queries are
processed first left-to-right and then right-to-left if that fails. So you may
search for "pilkington avenue, birmingham" as well as for "birmingham, pilkington
avenue". Commas are optional, but improve performance by reducing the complexity
of the search.
Results from the search are used to create geo:place nodes.
The --language argument sets the preferred language order for showing results.
The value may either be a simple comma-separated list of language codes or have the same
values as the browser Accept-Language HTTP header. The Nominatim API will use the value(s)
to determine the correct language. Basic language values are typically represented by two
characters. Location-specific values are expressed in a two part format, indicating
the language and the country where this version of the language is used.
Examples:
// Search for a place.
nominatim.search "avenue pasteur"
// Yield the results of a query.
nominatim.search --yield "avenue pasteur, monaco"
// Limit search results to specific countries and size.
nominatim.search --yield --size 20 --countries fr,nl "monaco"
// Limit search results to a specific area.
nominatim.search --yield --bbox (7.4104824,7.4128571,43.7293128,43.7307679) "avenue pasteur"
Usage: nominatim.search [options] <query>
Options:
--help : Display the command usage.
--debug : Show verbose debug output.
--size <size> : Limit the number of results ingested to the given size (40 max). (default: 10)
--yield : Yield nodes created into the output stream.
--countries <countries> : Limit the search to one or more countries. Must be the ISO 3166-1alpha2 codes e.g. gb
for the United Kingdom, de for Germany.
--bbox <bbox> : Limit the search to a specific area. Specify in geo:bbox type e.g. (xmin, xmax, ymin,
ymax)
--language <language> : The default accept-language for the endpoint (see description for more info).
--config <config> : Override the default config with the provided name.
Arguments:
<query> : Query string used to query Nominatim.
Storm Modules
This package does not export any Storm APIs.