geodesy.gen_uuid

Generate UUIDs for Geographic Information messages.

Deprecated since version 0.2.2.

Map points, features and segments all have universally unique identifier names (UUID), using geographic_msgs/UniqueID messages.

Matching features within each name space must yield the same UUID. The method used is RFC 4122 variant 5, computing the SHA-1 hash of a URL encoded using the map source.

For example, Open Street Map identifiers are encoded like this:

generate('http://openstreetmap.org/node/', node_id)
generate('http://openstreetmap.org/way/', way_id)
generate('http://openstreetmap.org/relation/', rel_id)

Here the *_id parameters are integer representations of OSM node, way, or relation identifiers.

For RouteSegment graph edges we use:

generate('http://ros.org/wiki/PACKAGE_NAME/START_UUID/END_UUID')

Where PACKAGE_NAME is the generating ROS package, START_UUID names the beginning way point, and END_UUID is the ending way point.

geodesy.gen_uuid.generate(url, id=None)[source]

Generate UUID for geographic data.

Parameters:
  • url – URL indicating generating source
  • id (int or string convertible to int) – (optional) identifier, unique within URL name space
Returns:

standard Python uuid object

Raises :

ValueError if id not convertible to int.

geodesy.gen_uuid.makeUniqueID(url, id=None)[source]

Create a UniqueID message for id number in name space ns.

Parameters:
  • url – URL indicating generating source
  • id (int or string convertible to int) – (optional) identifier, unique within URL name space
Returns:

geographic_msgs/UniqueID message

Raises :

ValueError if id not convertible to int.

Previous topic

geodesy.bounding_box

Next topic

geodesy.props

This Page