AdrianKriger / osm_LoD1_3DCityModel

LoD1 3D City Model from OpenStreetMap contributions and raster DEM
https://adriankriger.github.io/osm_LoD1_3DCityModel/
MIT License
8 stars 1 forks source link

village/campus ~ Woodstock #6

Closed AdrianKriger closed 2 years ago

AdrianKriger commented 2 years ago

Woodstock ~ Relation: (2034285) fails?

AdrianKriger commented 2 years ago

Add Cape Town City Center -> village/campus -> as well. This might be why Cape Town Ward 115 -> districts -> fails.

Mouille Point, V&A Waterfront, Foreshore -> (village/campus) -> and Ward 57 -> (district) -> pass.

Definitely some feature in the area. Try to isolate.

AdrianKriger commented 2 years ago

Fixed with 07b23d0

With reference to village/campus: a) Linestring buildings that are not polygons

 # take care of non-Polygon LineString's 
    for i, row in ts.iterrows():
        if row.geometry.type == 'LineString' and len(row.geometry.coords) < 3:
            ts = ts.drop(ts.index[i])

b) aoi relations that return many areas

# when relations return may areas
    if b_type == 'relation' and len(aoi) > 1:
        for i, row in aoi.iterrows():
            if row.tags != None and 'place' in row.tags:
                focus = row

        trim = pd.DataFrame(focus)
        trim = trim.T
        aoi = gpd.GeoDataFrame(trim, geometry = trim['geometry'])

c) buildings that are nodes

if row['type'] != 'node' and row['tags'] != None and 'building:levels' in row['tags']:

I'll open a separate issue for Districts.