MCPcopy Create free account
hub / github.com/comaps/comaps / read_bounds

Function read_bounds

tools/python/mwm/mwm_python.py:337–343  ·  view source on GitHub ↗

Reads mercator bounds, returns (min_lon, min_lat, max_lon, max_lat).

(f, coord_size)

Source from the content-addressed store, hash-verified

335
336
337def read_bounds(f, coord_size) -> mi.Rect:
338 """Reads mercator bounds, returns (min_lon, min_lat, max_lon, max_lat)."""
339 rmin = mwm_bitwise_split(read_varint(f))
340 rmax = mwm_bitwise_split(read_varint(f))
341 pmin = to_4326(coord_size, rmin)
342 pmax = to_4326(coord_size, rmax)
343 return mi.Rect(left_bottom=pmin, right_top=pmax)
344
345
346def read_string(f, plain: bool = False, decode: bool = True) -> AnyStr:

Callers 1

__init__Method · 0.85

Calls 4

mwm_bitwise_splitFunction · 0.85
read_varintFunction · 0.85
to_4326Function · 0.85
RectMethod · 0.80

Tested by

no test coverage detected