MCPcopy Create free account
hub / github.com/Yasoz/DiffTraj / divide_grids

Function divide_grids

utils/utils.py:77–86  ·  view source on GitHub ↗
(boundary, grids_num)

Source from the content-addressed store, hash-verified

75
76
77def divide_grids(boundary, grids_num):
78 lati_min, lati_max = boundary['lati_min'], boundary['lati_max']
79 long_min, long_max = boundary['long_min'], boundary['long_max']
80 # Divide the latitude and longitude into grids_num intervals.
81 lati_interval = (lati_max - lati_min) / grids_num
82 long_interval = (long_max - long_min) / grids_num
83 # Create arrays of latitude and longitude values.
84 latgrids = np.arange(lati_min, lati_max, lati_interval)
85 longrids = np.arange(long_min, long_max, long_interval)
86 return latgrids, longrids
87
88
89# calculte the distance between two points

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected