Get mesh network#
- shift.get_mesh_network(lower_left: GeoLocation, upper_right: GeoLocation, spacing: Distance) Graph #
Creates a rectangular mesh network from a given set of points.
- Parameters:
lower_left (tuple) – gelocation representing lower left point
upper_right (tuple) – geolocation representing upper right point
spacing (Distance) – spacing between nodes.
- Return type:
nx.Graph
Examples
>>> from shift import get_mesh_network >>> from infrasys.quantities import Distance >>> lower_left = GeoLocation(-97.33, 45.56) >>> upper_right = GeoLocation(-97.31, 45.64) >>> graph = get_mesh_network(lower_left, upper_right, Distance(10, "m")) >>> len(graph.nodes) 199584