~qeef/damn-client.py

5e712104d1f4b539eb1b8dfb8ace8ee42f272377 — Jiri Vlasak a month ago 919f4b2 master
Skip existing files
1 files changed, 3 insertions(+), 0 deletions(-)

M osmsm_gen.py
M osmsm_gen.py => osmsm_gen.py +3 -0
@@ 11,6 11,7 @@ import json
import staticmaps
import sys
from math import cos, floor, pi
from os.path import exists
from shapely.ops import unary_union
from shapely.geometry import shape
from damn_client.api import DamnAPI


@@ 56,6 57,8 @@ if __name__ == "__main__":
    s = DamnAPI(sys.argv[1])
    s.get_geometries()
    for a in s.areas.values():
        if exists("{}/{}.png".format(DN, a["aid"])):
            continue
        a["shape"] = []
        for f in a["featurecollection"]["features"]:
            a["shape"].append(shape(f["geometry"]))