def convert_planet( tool: AnyStr, in_planet: AnyStr, out_planet: AnyStr, output=subprocess.DEVNULL, error=subprocess.DEVNULL, ): osmconvert(tool, in_planet, out_planet, output=output, error=error) write_md5sum(out_planet, md5_ext(out_planet))
def step_update_planet(env: Env, **kwargs): tmp = f"{env.paths.planet_o5m}.tmp" osmupdate( env[settings.OSM_TOOL_UPDATE], env.paths.planet_o5m, tmp, output=env.get_subprocess_out(), error=env.get_subprocess_out(), **kwargs, ) os.remove(env.paths.planet_o5m) os.rename(tmp, env.paths.planet_o5m) write_md5sum(env.paths.planet_o5m, md5_ext(env.paths.planet_o5m))