Coverage for scripts/scratch.py: 0%
3 statements
« prev ^ index » next coverage.py v7.6.0, created at 2024-07-28 10:12 -0400
« prev ^ index » next coverage.py v7.6.0, created at 2024-07-28 10:12 -0400
1from src.overturetoosm.buildings import process_building
3props = {
4 "ext_foo": "I am a customer user property.",
5 "ext_bar": "Me too!",
6 "theme": "buildings",
7 "type": "building",
8 "version": 1,
9 "level": 1,
10 "height": 21.34,
11 "num_floors": 4,
12 "num_floors_underground": 1,
13 "subtype": "transportation",
14 "roof_shape": "gabled",
15 "roof_material": "concrete",
16 "facade_color": "white",
17 "class": "parking",
18 "is_underground": False,
19 "sources": [
20 {"property": "", "dataset": "microsoftMLBuildings,", "confidence": 1},
21 {
22 "property": "/properties/height",
23 "dataset": "metaLidarExtractions,",
24 "confidence": 0.95,
25 },
26 ],
27}
29print(process_building(props))
30# with open("scripts/test_in.geojson", "r", encoding="utf-8") as f:
31# contents: dict = json.load(f)
33# for feature in contents["features"]:
34# feature["properties"] = process_props(feature["properties"])
36# with open("scripts/test_out.geojson", "w+", encoding="utf-8") as f:
37# json.dump(contents, f, indent=4)
39# with open("scripts/test_in.geojson", "r", encoding="utf-8") as f:
40# contents: dict = json.load(f)
41# geojson = process_geojson(contents)
43# with open("scripts/test_out.geojson", "w+", encoding="utf-8") as f:
44# json.dump(geojson, f, indent=4)