Network utilities¶
Output the network¶
-
mtldp.mtlmap.
save_network_to_xml
(network, output_file, directed=True)¶ save network to osm xml file
- Parameters
network –
mimap.Network
output_file – location of the output xml file
directed – if true, output the segment instead since all segments are directed osm ways
Network converter¶
-
mtldp.tools.
convert_osm_to_shp
(osm_file, output_folder, fastmm=True, bidirectional=False, simplify=False, retain_all=True, encoding='utf-8')¶ Convert the OSM xml map to shapefile
This function requires the osmnx package
Reference:
OSMnx (https://github.com/gboeing/osmnx)
OSMnx example (https://github.com/gboeing/osmnx-examples)
- Parameters
osm_file –
output_folder –
fastmm – True to output the shapefile for the fast map matching
bidirectional –
simplify –
retain_all –
encoding –
- Returns