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

Function read_point

tools/python/mwm/mwm_python.py:314–317  ·  view source on GitHub ↗

Reads an unsigned point, returns (x, y).

(f, base_point: mi.Point, packed: bool = True)

Source from the content-addressed store, hash-verified

312
313
314def read_point(f, base_point: mi.Point, packed: bool = True) -> mi.Point:
315 """Reads an unsigned point, returns (x, y)."""
316 u = read_varuint(f) if packed else read_uint(f, 8)
317 return mwm_decode_delta(u, base_point)
318
319
320def to_4326(coord_size: int, point: mi.Point) -> mi.Point:

Callers 1

read_coordFunction · 0.85

Calls 3

read_varuintFunction · 0.85
read_uintFunction · 0.85
mwm_decode_deltaFunction · 0.85

Tested by

no test coverage detected