fix: full city created

This commit is contained in:
Saeed Ranjbar 2024-08-07 09:25:19 -04:00
parent abd921fdc2
commit 0aad1f1667
4 changed files with 2672 additions and 4 deletions

View File

@ -1,8 +1,8 @@
import json
from shapely.geometry import shape, mapping, Polygon, MultiPolygon
from pathlib import Path
file_path = (Path(__file__).parent / 'input_files' / 'riga_case_study_84.geojson')
output_filepath = (Path(__file__).parent / 'input_files' / 'riga_case_study_84_rh.geojson')
file_path = (Path(__file__).parent / 'input_files' / 'riga_case_study_84_full.geojson')
output_filepath = (Path(__file__).parent / 'input_files' / 'riga_case_study_84_fixed.geojson')
def enforce_right_hand_rule(geojson):
for feature in geojson['features']:
geometry = shape(feature['geometry'])

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,40 @@
{
"type": "FeatureCollection",
"name": "riga_case_study_84",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "Name": "B1800", "floors_ag": 19, "floors_bg": 0, "height_ag": 57, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.1218395, 56.9645234 ], [ 24.1218652, 56.9645116 ], [ 24.1218804, 56.964521399999981 ], [ 24.1220837, 56.964428 ], [ 24.1219769, 56.9643588 ], [ 24.1219924, 56.9643517 ], [ 24.1219417, 56.9643189 ], [ 24.1219191, 56.9643043 ], [ 24.1219036, 56.9643114 ], [ 24.1218065, 56.964248599999983 ], [ 24.1214785, 56.964399299999975 ], [ 24.1215644, 56.9644549 ], [ 24.1211979, 56.9645399 ], [ 24.1213666, 56.9647559 ], [ 24.1214121, 56.9647454 ], [ 24.1217704, 56.9646622 ], [ 24.1217329, 56.9646142 ], [ 24.1218831, 56.9645793 ], [ 24.1218395, 56.9645234 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B1400", "floors_ag": 4, "floors_bg": 0, "height_ag": 16, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.1232095, 56.965445500000015 ], [ 24.1228969, 56.9655167 ], [ 24.1229476, 56.9655829 ], [ 24.1232599, 56.9655118 ], [ 24.1232995, 56.9655634 ], [ 24.1235113, 56.9655151 ], [ 24.1234907, 56.96548809999998 ], [ 24.1234832, 56.9654898 ], [ 24.1232882, 56.965235399999976 ], [ 24.1232957, 56.9652337 ], [ 24.1232755, 56.9652074 ], [ 24.123064, 56.9652556 ], [ 24.1232095, 56.965445500000015 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B1300", "floors_ag": 2, "floors_bg": 0, "height_ag": 8, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.124009, 56.9660127 ], [ 24.1240615, 56.9660682 ], [ 24.1238907, 56.9661096 ], [ 24.1239885, 56.966229400000017 ], [ 24.1245675, 56.966088899999988 ], [ 24.1244697, 56.965969199999968 ], [ 24.1240998, 56.9660589 ], [ 24.1240536, 56.96601 ], [ 24.1241027, 56.9660071 ], [ 24.1240899, 56.9659432 ], [ 24.1239957, 56.9659488 ], [ 24.1239532, 56.965904 ], [ 24.124105, 56.965868499999985 ], [ 24.1240148, 56.9657538 ], [ 24.1234244, 56.9658917 ], [ 24.1235146, 56.966006399999984 ], [ 24.1239147, 56.965913 ], [ 24.1239511, 56.9659515 ], [ 24.1239337, 56.965952499999986 ], [ 24.1239466, 56.9660164 ], [ 24.124009, 56.9660127 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B1500", "floors_ag": 2, "floors_bg": 0, "height_ag": 8, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.1222285, 56.965668599999987 ], [ 24.122281, 56.9657241 ], [ 24.1221102, 56.9657655 ], [ 24.122208, 56.965885299999975 ], [ 24.122787, 56.965744799999982 ], [ 24.1226892, 56.9656251 ], [ 24.1223193, 56.965714799999986 ], [ 24.1222731, 56.9656659 ], [ 24.1223222, 56.965663 ], [ 24.1223094, 56.9655991 ], [ 24.1222152, 56.9656047 ], [ 24.1221727, 56.965559900000017 ], [ 24.1223245, 56.9655244 ], [ 24.1222343, 56.96540969999996 ], [ 24.1216439, 56.9655476 ], [ 24.1217341, 56.965662300000012 ], [ 24.1221342, 56.965568900000015 ], [ 24.1221706, 56.9656074 ], [ 24.1221532, 56.9656084 ], [ 24.1221661, 56.9656723 ], [ 24.1222285, 56.965668599999987 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B1600", "floors_ag": 2, "floors_bg": 0, "height_ag": 8, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.1228066, 56.9647243 ], [ 24.1224386, 56.964483899999983 ], [ 24.1222786, 56.964556599999987 ], [ 24.1223911, 56.9646301 ], [ 24.1223889, 56.9646311 ], [ 24.1224157, 56.9646486 ], [ 24.1224179, 56.9646476 ], [ 24.1225075, 56.9647061 ], [ 24.1225053, 56.9647071 ], [ 24.1225326, 56.964725 ], [ 24.1225348, 56.964724 ], [ 24.1226466, 56.964797099999977 ], [ 24.1228066, 56.9647243 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B2000", "floors_ag": 2, "floors_bg": 0, "height_ag": 8, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.1210359, 56.964091799999977 ], [ 24.1210827, 56.9639808 ], [ 24.1205255, 56.963911 ], [ 24.1204787, 56.964022 ], [ 24.1210359, 56.964091799999977 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B1700", "floors_ag": 1, "floors_bg": 0, "height_ag": 3, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.1227897, 56.9650907 ], [ 24.1230636, 56.9649775 ], [ 24.1229183, 56.964873 ], [ 24.122821, 56.9649132 ], [ 24.1228932, 56.9649651 ], [ 24.1227165, 56.9650381 ], [ 24.1227897, 56.9650907 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B0100", "floors_ag": 9, "floors_bg": 0, "height_ag": 38, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.122494, 56.971717 ], [ 24.1230018, 56.9715891 ], [ 24.1229291, 56.9714988 ], [ 24.1230522, 56.9714704 ], [ 24.1229747, 56.971371699999978 ], [ 24.122847, 56.9714024 ], [ 24.1227568, 56.9712955 ], [ 24.1222324, 56.9714029 ], [ 24.122494, 56.971717 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B1200", "floors_ag": 1, "floors_bg": 0, "height_ag": 5, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.1221349, 56.966486099999983 ], [ 24.1221304, 56.9664871 ], [ 24.1221356, 56.9664938 ], [ 24.1221481, 56.9664908 ], [ 24.122146, 56.9664881 ], [ 24.1221953, 56.9664766 ], [ 24.1221975, 56.9664793 ], [ 24.1222627, 56.9664641 ], [ 24.1222605, 56.966461299999978 ], [ 24.1223101, 56.966449800000014 ], [ 24.1223122, 56.9664525 ], [ 24.1223769, 56.9664375 ], [ 24.1223747, 56.9664347 ], [ 24.1224243, 56.966423099999986 ], [ 24.1224265, 56.9664259 ], [ 24.1224353, 56.9664238 ], [ 24.1224331, 56.966421 ], [ 24.1224819, 56.9664096 ], [ 24.1224842, 56.966412399999982 ], [ 24.1225499, 56.9663971 ], [ 24.1225476, 56.9663943 ], [ 24.1225967, 56.9663828 ], [ 24.122599, 56.9663856 ], [ 24.1226656, 56.966370099999985 ], [ 24.1226633, 56.9663672 ], [ 24.1227115, 56.966356 ], [ 24.1227137, 56.9663589 ], [ 24.1227259, 56.966356 ], [ 24.1227207, 56.9663494 ], [ 24.1227162, 56.9663504 ], [ 24.1226891, 56.966316 ], [ 24.1226936, 56.966315 ], [ 24.1226886, 56.966308499999982 ], [ 24.1226841, 56.9663096 ], [ 24.1226566, 56.966274599999977 ], [ 24.1226612, 56.9662736 ], [ 24.1226559, 56.9662668 ], [ 24.1226436, 56.96626969999997 ], [ 24.1226461, 56.9662728 ], [ 24.1225979, 56.966284099999989 ], [ 24.1225955, 56.9662809 ], [ 24.1225871, 56.9662829 ], [ 24.1225895, 56.966286 ], [ 24.1225403, 56.966297499999982 ], [ 24.1225379, 56.9662944 ], [ 24.1225289, 56.9662965 ], [ 24.1225313, 56.966299600000013 ], [ 24.1224822, 56.966311099999984 ], [ 24.1224797, 56.9663079 ], [ 24.1224725, 56.966309599999988 ], [ 24.1224749, 56.9663128 ], [ 24.1224252, 56.9663244 ], [ 24.1224227, 56.966321200000017 ], [ 24.1224141, 56.9663233 ], [ 24.1224166, 56.9663264 ], [ 24.1223677, 56.9663378 ], [ 24.1223652, 56.9663347 ], [ 24.1223564, 56.966336699999985 ], [ 24.1223589, 56.966339899999987 ], [ 24.1223093, 56.966351499999924 ], [ 24.1223068, 56.9663483 ], [ 24.1222998, 56.9663499 ], [ 24.1223023, 56.966353099999985 ], [ 24.1222519, 56.9663649 ], [ 24.1222494, 56.9663617 ], [ 24.1222421, 56.9663634 ], [ 24.1222447, 56.9663666 ], [ 24.1221951, 56.9663782 ], [ 24.1221925, 56.966374899999984 ], [ 24.1221855, 56.9663766 ], [ 24.122188, 56.9663798 ], [ 24.122138, 56.9663915 ], [ 24.1221354, 56.9663883 ], [ 24.1221274, 56.9663901 ], [ 24.1221299, 56.9663934 ], [ 24.1220806, 56.966404899999979 ], [ 24.122078, 56.966401699999984 ], [ 24.1220656, 56.966404599999983 ], [ 24.1220709, 56.9664113 ], [ 24.1220753, 56.966410299999986 ], [ 24.1221028, 56.966445199999967 ], [ 24.1220983, 56.9664462 ], [ 24.1221034, 56.9664527 ], [ 24.1221078, 56.9664516 ], [ 24.1221349, 56.966486099999983 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B1100", "floors_ag": 1, "floors_bg": 0, "height_ag": 4, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.122307, 56.9667137 ], [ 24.1228958, 56.9665804 ], [ 24.1228925, 56.9665761 ], [ 24.1228446, 56.9665132 ], [ 24.1224568, 56.966601 ], [ 24.1224412, 56.966580599999986 ], [ 24.1223475, 56.9666018 ], [ 24.1223284, 56.9665767 ], [ 24.1222211, 56.966601 ], [ 24.1222552, 56.9666458 ], [ 24.122307, 56.9667137 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B1401", "floors_ag": 4, "floors_bg": 0, "height_ag": 16, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.1231481, 56.965652799999987 ], [ 24.12323, 56.9657585 ], [ 24.12332, 56.965737699999984 ], [ 24.1233394, 56.965762700000013 ], [ 24.1235339, 56.965717799999979 ], [ 24.1234326, 56.965587199999987 ], [ 24.1231481, 56.965652799999987 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B0400", "floors_ag": 8, "floors_bg": 0, "height_ag": 27, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.1241219, 56.9701628 ], [ 24.1243666, 56.9701074 ], [ 24.1241225, 56.9697875 ], [ 24.1242322, 56.9697626 ], [ 24.1241531, 56.9696589 ], [ 24.1237988, 56.9697392 ], [ 24.1241219, 56.9701628 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B0300", "floors_ag": 10, "floors_bg": 0, "height_ag": 34, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.1244961, 56.970713099999976 ], [ 24.1248559, 56.9706316 ], [ 24.1247733, 56.970523300000018 ], [ 24.1246539, 56.9705503 ], [ 24.1244115, 56.970232499999987 ], [ 24.124171, 56.970287 ], [ 24.1244961, 56.970713099999976 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B0200", "floors_ag": 10, "floors_bg": 0, "height_ag": 34, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.1244608, 56.97107350000001 ], [ 24.1244404, 56.9710467 ], [ 24.1241535, 56.971111699999987 ], [ 24.1240594, 56.9711331 ], [ 24.1239528, 56.970993300000018 ], [ 24.1237162, 56.9710469 ], [ 24.1239218, 56.9713166 ], [ 24.1242526, 56.9712416 ], [ 24.1245394, 56.9711766 ], [ 24.1245567, 56.971199200000015 ], [ 24.1249793, 56.971103499999977 ], [ 24.1249508, 56.971066 ], [ 24.1251524, 56.9710204 ], [ 24.1249401, 56.970742 ], [ 24.1246988, 56.9707966 ], [ 24.1248438, 56.9709867 ], [ 24.1244608, 56.97107350000001 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B1000", "floors_ag": 1, "floors_bg": 0, "height_ag": 3, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.1255341, 56.9707805 ], [ 24.1279307, 56.9702365 ], [ 24.1278799, 56.9701866 ], [ 24.1254934, 56.9707296 ], [ 24.1255341, 56.9707805 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B1001", "floors_ag": 1, "floors_bg": 0, "height_ag": 3, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.125582, 56.9708454 ], [ 24.1257884, 56.9711124 ], [ 24.1258851, 56.9710911 ], [ 24.1256732, 56.97082420000001 ], [ 24.125582, 56.9708454 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B1002", "floors_ag": 1, "floors_bg": 0, "height_ag": 3, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.1257834, 56.970803 ], [ 24.1259851, 56.971067 ], [ 24.1261787, 56.971023 ], [ 24.125977, 56.970759 ], [ 24.1257834, 56.970803 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B1003", "floors_ag": 1, "floors_bg": 0, "height_ag": 3, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.1260909, 56.9707345 ], [ 24.1262863, 56.970997 ], [ 24.1264841, 56.9709533 ], [ 24.1262886, 56.9706907 ], [ 24.1260909, 56.9707345 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B1004", "floors_ag": 1, "floors_bg": 0, "height_ag": 3, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.1263792, 56.970665299999986 ], [ 24.1265835, 56.9709296 ], [ 24.126775, 56.9708857 ], [ 24.1265707, 56.970621400000013 ], [ 24.1263792, 56.970665299999986 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B1900", "floors_ag": 4, "floors_bg": 0, "height_ag": 22, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.1213666, 56.9647559 ], [ 24.1211979, 56.9645399 ], [ 24.1211796, 56.9645164 ], [ 24.1212251, 56.9645059 ], [ 24.121122, 56.9643739 ], [ 24.1211074, 56.964361600000011 ], [ 24.1210901, 56.9643501 ], [ 24.1210697, 56.9643412 ], [ 24.1210456, 56.9643332 ], [ 24.1210219, 56.9643285 ], [ 24.1209934, 56.9643251 ], [ 24.1209691, 56.964324800000014 ], [ 24.1209393, 56.9643268 ], [ 24.1209169, 56.9643305 ], [ 24.1208891, 56.9643379 ], [ 24.1208709, 56.964345 ], [ 24.1208548, 56.964353300000013 ], [ 24.1208408, 56.9643628 ], [ 24.1208294, 56.9643732 ], [ 24.1208205, 56.9643843 ], [ 24.1208146, 56.964396 ], [ 24.1208116, 56.964408 ], [ 24.1208117, 56.9644202 ], [ 24.1208147, 56.9644322 ], [ 24.1208207, 56.964443899999978 ], [ 24.1209844, 56.9646535 ], [ 24.1213757, 56.9651545 ], [ 24.12139, 56.965166600000011 ], [ 24.1214058, 56.965176599999985 ], [ 24.1214256, 56.965185599999977 ], [ 24.1214469, 56.965192700000017 ], [ 24.1214702, 56.9651979 ], [ 24.121495, 56.965201199999981 ], [ 24.1215194, 56.96520240000001 ], [ 24.1215456, 56.96520139999997 ], [ 24.1215688, 56.9651985 ], [ 24.1215938, 56.9651931 ], [ 24.1216138, 56.965186699999983 ], [ 24.1216326, 56.9651787 ], [ 24.1216485, 56.9651692 ], [ 24.1216622, 56.9651588 ], [ 24.1216726, 56.9651471 ], [ 24.1216803, 56.9651352 ], [ 24.1216841, 56.9651221 ], [ 24.1216854, 56.9651097 ], [ 24.1216821, 56.9650964 ], [ 24.121677, 56.9650845 ], [ 24.1215979, 56.9649832 ], [ 24.121444, 56.9647863 ], [ 24.1214121, 56.9647454 ], [ 24.1213666, 56.9647559 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B1005", "floors_ag": 1, "floors_bg": 0, "height_ag": 3, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.1268166, 56.970774 ], [ 24.1270199, 56.9707286 ], [ 24.1268886, 56.970554 ], [ 24.1266853, 56.970599399999905 ], [ 24.1268166, 56.970774 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B1006", "floors_ag": 1, "floors_bg": 0, "height_ag": 3, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.1280193, 56.970505399999986 ], [ 24.1281636, 56.970473199999986 ], [ 24.1280346, 56.970301699999986 ], [ 24.1278904, 56.970333900000021 ], [ 24.1280193, 56.970505399999986 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B1007", "floors_ag": 1, "floors_bg": 0, "height_ag": 3, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.1271225, 56.970705700000011 ], [ 24.1273211, 56.9706614 ], [ 24.1271927, 56.9704906 ], [ 24.1269942, 56.970535 ], [ 24.1271225, 56.970705700000011 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B1008", "floors_ag": 1, "floors_bg": 0, "height_ag": 3, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.1274115, 56.970641199999974 ], [ 24.127613, 56.9705962 ], [ 24.1274813, 56.970420899999979 ], [ 24.1272798, 56.970465899999986 ], [ 24.1274115, 56.970641199999974 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B1009", "floors_ag": 1, "floors_bg": 0, "height_ag": 3, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.127716, 56.970573199999983 ], [ 24.127925, 56.970526500000013 ], [ 24.1277926, 56.970350400000051 ], [ 24.1275836, 56.970397 ], [ 24.127716, 56.970573199999983 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B1010", "floors_ag": 1, "floors_bg": 0, "height_ag": 3, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.1268166, 56.970774 ], [ 24.1268658, 56.9708395 ], [ 24.1282128, 56.9705386 ], [ 24.1281636, 56.970473199999986 ], [ 24.1280193, 56.970505399999986 ], [ 24.127925, 56.970526500000013 ], [ 24.127716, 56.970573199999983 ], [ 24.127613, 56.9705962 ], [ 24.1274115, 56.970641199999974 ], [ 24.1273211, 56.9706614 ], [ 24.1271225, 56.970705700000011 ], [ 24.1270199, 56.9707286 ], [ 24.1268166, 56.970774 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B0800", "floors_ag": 2, "floors_bg": 0, "height_ag": 20, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.1205074, 56.96738580000001 ], [ 24.1202841, 56.9675192 ], [ 24.1203689, 56.967596600000014 ], [ 24.1204449, 56.9676915 ], [ 24.1204243, 56.9676965 ], [ 24.1205108, 56.9678094 ], [ 24.1205301, 56.9678047 ], [ 24.1205969, 56.96798110000001 ], [ 24.1207115, 56.968158099999989 ], [ 24.1208544, 56.9683262 ], [ 24.1210379, 56.968484099999984 ], [ 24.1211092, 56.968577700000012 ], [ 24.1212353, 56.968550700000016 ], [ 24.1213664, 56.9685478 ], [ 24.1214738, 56.968541 ], [ 24.1215609, 56.9685317 ], [ 24.1216507, 56.9685178 ], [ 24.1217762, 56.9684924 ], [ 24.1218854, 56.968463699999973 ], [ 24.1219498, 56.9684443 ], [ 24.1220068, 56.9684211 ], [ 24.1221396, 56.9683628 ], [ 24.1221121, 56.9683464 ], [ 24.1223133, 56.9682995 ], [ 24.1222529, 56.9682203 ], [ 24.1222301, 56.9682258 ], [ 24.1220548, 56.9679982 ], [ 24.1219877, 56.9679111 ], [ 24.1220187, 56.9679051 ], [ 24.1219404, 56.9678061 ], [ 24.1218385, 56.967673499999989 ], [ 24.121805, 56.9676804 ], [ 24.1216903, 56.967535299999987 ], [ 24.1217133, 56.9675305 ], [ 24.1216252, 56.9674172 ], [ 24.1216011, 56.967421599999987 ], [ 24.12142, 56.9671899 ], [ 24.1205325, 56.9673975 ], [ 24.1205074, 56.96738580000001 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B0900", "floors_ag": 2, "floors_bg": 0, "height_ag": 22, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.1234099, 56.967510499999975 ], [ 24.1234865, 56.9674921 ], [ 24.1235447, 56.967568599999986 ], [ 24.1235264, 56.9675734 ], [ 24.1235142, 56.967569099999977 ], [ 24.1234993, 56.9675678 ], [ 24.1234723, 56.9675708 ], [ 24.1234571, 56.967578600000017 ], [ 24.1234473, 56.967587799999976 ], [ 24.1234435, 56.9675989 ], [ 24.1234464, 56.9676114 ], [ 24.1234563, 56.967622399999982 ], [ 24.123473, 56.9676298 ], [ 24.1234977, 56.9676336 ], [ 24.1235224, 56.96763 ], [ 24.1235343, 56.9676255 ], [ 24.1235463, 56.9676203 ], [ 24.1235513, 56.9676143 ], [ 24.1235528, 56.967608400000017 ], [ 24.1235698, 56.9676054 ], [ 24.1236431, 56.967693300000015 ], [ 24.1235349, 56.9677162 ], [ 24.1241175, 56.9684576 ], [ 24.1248027, 56.96829910000001 ], [ 24.1248227, 56.968324099999982 ], [ 24.1258211, 56.9680976 ], [ 24.125776, 56.968024500000013 ], [ 24.1259095, 56.9679931 ], [ 24.1256396, 56.9676405 ], [ 24.1254088, 56.9673278 ], [ 24.1252524, 56.967357399999983 ], [ 24.1251533, 56.9672231 ], [ 24.1249927, 56.9673052 ], [ 24.1249007, 56.967252 ], [ 24.124928, 56.9672289 ], [ 24.1249424, 56.9672019 ], [ 24.12494, 56.967162699999975 ], [ 24.1249204, 56.967132 ], [ 24.1248931, 56.967114699999982 ], [ 24.124849, 56.9670955 ], [ 24.1248042, 56.9670909 ], [ 24.1247496, 56.9670908 ], [ 24.1247168, 56.967096599999984 ], [ 24.1246819, 56.967111200000012 ], [ 24.1246464, 56.9671269 ], [ 24.1246236, 56.967143 ], [ 24.1246122, 56.9671583 ], [ 24.1246077, 56.9671711 ], [ 24.1245379, 56.967184099999983 ], [ 24.1242825, 56.9668602 ], [ 24.1237729, 56.9669795 ], [ 24.1237936, 56.9670058 ], [ 24.1236256, 56.9670446 ], [ 24.1232123, 56.9671399 ], [ 24.1232373, 56.967172 ], [ 24.1231829, 56.9671855 ], [ 24.1231457, 56.967194699999951 ], [ 24.1230379, 56.9670539 ], [ 24.1227127, 56.967132599999985 ], [ 24.123105, 56.9676457 ], [ 24.1234485, 56.967565899999975 ], [ 24.1234099, 56.967510499999975 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B0600", "floors_ag": 6, "floors_bg": 0, "height_ag": 23, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.125470318632154, 56.968736530344401 ], [ 24.125724326337352, 56.969316396603652 ], [ 24.1259802, 56.969283399999952 ], [ 24.1260854, 56.969269899999986 ], [ 24.126085784554483, 56.969269850473445 ], [ 24.126048039148337, 56.969182956329966 ], [ 24.1260477, 56.969183 ], [ 24.1259425, 56.9691965 ], [ 24.1257192, 56.968681099999984 ], [ 24.1254727, 56.968736 ], [ 24.125470318632154, 56.968736530344401 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B0500", "floors_ag": 7, "floors_bg": 0, "height_ag": 20, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.125275458588852, 56.969595577558479 ], [ 24.124748035810672, 56.968897384632434 ], [ 24.1245141, 56.968949499999987 ], [ 24.1250379, 56.969648499999984 ], [ 24.125275458588852, 56.969595577558479 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B0700", "floors_ag": 6, "floors_bg": 0, "height_ag": 20, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.126360781090455, 56.968538327084602 ], [ 24.126762576174531, 56.969085955985697 ], [ 24.126313138663722, 56.969148584471363 ], [ 24.1263133, 56.9691488 ], [ 24.126048039148337, 56.969182956329966 ], [ 24.126085784554483, 56.969269850473445 ], [ 24.127087, 56.9691409 ], [ 24.1265962, 56.968485900000012 ], [ 24.1263627, 56.9685379 ], [ 24.126360781090455, 56.968538327084602 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B1011", "floors_ag": 1, "floors_bg": 0, "height_ag": 3, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.1281589, 56.9706474 ], [ 24.1260497, 56.9711194 ], [ 24.1260978, 56.9711832 ], [ 24.1272801, 56.970918599999983 ], [ 24.128136, 56.9707271 ], [ 24.128207, 56.970711199999982 ], [ 24.1281589, 56.9706474 ] ] ] ] } },
{ "type": "Feature", "properties": { "Name": "B1012", "floors_ag": 2, "floors_bg": 0, "height_ag": 9, "height_bg": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 24.1259055, 56.9712361 ], [ 24.1259474, 56.9712915 ], [ 24.1261116, 56.9712546 ], [ 24.1260295, 56.9711461 ], [ 24.1258653, 56.971183 ], [ 24.1258688, 56.97118769999998 ], [ 24.1258319, 56.971196 ], [ 24.1258686, 56.971244399999989 ], [ 24.1259055, 56.9712361 ] ] ] ] } }
]
}

View File

@ -2,13 +2,13 @@ from pathlib import Path
from hub.imports.geometry_factory import GeometryFactory
from hub.helpers.dictionaries import Dictionaries
# Specify the GeoJSON file path
file_path = (Path(__file__).parent / 'input_files' / 'riga_case_study_84_rh.geojson')
file_path = (Path(__file__).parent / 'input_files' / 'riga_case_study_84_fixed.geojson')
# Specify the output path for the PDF file
output_path = (Path(__file__).parent / 'out_files').resolve()
# Create city object from GeoJSON file
city = GeometryFactory('geojson',
path=file_path,
height_field='height',
height_field='height_ag',
year_of_construction_field=None,
function_field=None,
function_to_hub=None).city