osm_cartography.geo_map¶
Class for manipulating GeographicMap data.
Warning
This module is unstable and still evolving. It will probably end up residing in some other package.
-
class
osm_cartography.geo_map.GeoMap(gmap)[source]¶ GeoMapprovides an internal geographic_msgs/GeographicMap representation.Parameters: gmap – geographic_msgs/GeographicMap message. -
bounds()[source]¶ Returns: geographic_msgs/BoundingBox from the geographic_msgs/GeographicMap message.
-
header()[source]¶ Returns: std_msgs/Header from the geographic_msgs/GeographicMap message.
-
-
class
osm_cartography.geo_map.GeoMapFeatures(geomap)[source]¶ GeoMapFeaturesprovides a filtering iterator for the features in aosm_cartography.geo_map.GeoMap.Parameters: geomap – GeoMapobject.GeoMapFeaturesprovides these standard container operations:-
len(features) Returns: The number of points in the set.
-
features[uuid] Returns: The point with key uuid. Raises a KeyErrorif uuid is not in the set.
-
uuid in features Returns: Trueif features has a key uuid, elseFalse.
-
uuid not in features Equivalent to
not uuid in features.
-
iter(features) Returns: An iterator over all the features. This is a shortcut for iterkeys().Example:
gm = GeoMap(msg) gf = GeoMapFeatures(gm) for feat in gf: print str(feat)
-