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

Function osmconvert

tools/python/maps_generator/generator/osmtools.py:42–69  ·  view source on GitHub ↗
(
    name_executable,
    in_file,
    out_file,
    output=subprocess.DEVNULL,
    error=subprocess.DEVNULL,
    run_async=False,
    **kwargs,
)

Source from the content-addressed store, hash-verified

40
41
42def osmconvert(
43 name_executable,
44 in_file,
45 out_file,
46 output=subprocess.DEVNULL,
47 error=subprocess.DEVNULL,
48 run_async=False,
49 **kwargs,
50):
51 env = os.environ.copy()
52 env["PATH"] = f"{settings.OSM_TOOLS_PATH}:{env['PATH']}"
53 p = subprocess.Popen(
54 [
55 name_executable,
56 in_file,
57 "--drop-author",
58 "--drop-version",
59 "--out-o5m",
60 f"-o={out_file}",
61 ],
62 env=env,
63 stdout=output,
64 stderr=error,
65 )
66 if run_async:
67 return p
68 else:
69 wait_and_raise_if_fail(p)
70
71
72def osmupdate(

Callers 1

convert_planetFunction · 0.90

Calls 1

wait_and_raise_if_failFunction · 0.90

Tested by

no test coverage detected