Package mosp_tools :: Module analyze_map
[hide private]
[frames] | no frames]

Module analyze_map

source code

Tool for analyzing a osm map


Author: B. Henne

Contact: henne@dcsec.uni-hannover.de

Copyright: (c) 2011, DCSec, Leibniz Universitaet Hannover, Germany

License: GPLv3

Functions [hide private]
 
count_neighbors(nodes)
Feed in mosp.core.Simulation.nodes aka self.sim.nodes aka s.sim.nodes.
source code
 
count_partitions(nodes)
Feed in mosp.core.Simulation.nodes aka self.sim.nodes aka s.sim.nodes.
source code
 
print_partition(nodes, neighbors_from_count_partitions, i)
Outputs nodes of partition i after having been counted by count_partitions()
source code
 
print_osm(geo, partitions=None)
Outputs geo's geo data as osm xml to view in osm editor like JOSM
source code
 
main()
This tool helps to analyze the map data after having been loaded into mosp.
source code
Variables [hide private]
  __package__ = 'mosp_tools'
Function Details [hide private]

count_partitions(nodes)

source code 

Feed in mosp.core.Simulation.nodes aka self.sim.nodes aka s.sim.nodes. Returns (1) array containing index=nodes[i].id, value=partition number and (2) number of partitions.

main()

source code 

This tool helps to analyze the map data after having been loaded into mosp. This can help to find mistakes in maps and map usage in the simulator. This tool can be used to show and remove partitioned graphs. To do this, count the partitions, then output map as osm data, open it in JOSM, search for partition:1, partition:2, ... open the original map and fix it.