Parametrized local LBSM land use patterns (Großer Garten example)
Parametrized local LBSM land use patterns (Großer Garten example)
- Jupyter Notebook (HTML)
- Jupyter Notebook Download
- Großer Garten Map
Terms and bounding box are defined initially:
# Term definition
topic = "grass-nature-park"
points = tm.clusterer[TOPICS].get_np_points(
item=topic,
silent=True)
# Großer Garten Bounding Box
def lies_within(x, y):
# optional filtering for bounding box
if (lim_lng_min < x < lim_lng_max) and (lim_lat_min < y < lim_lat_max):
return True
lim_lng_max = 13.7881851196289
lim_lng_min = 13.7279319763184
lim_lat_max = 51.051862274016
lim_lat_min = 51.0257408831289
# list comprehension
for idx, points in enumerate(points_list):
points_list[idx] = np.array([[point[0], point[1]] for point in points if lies_within(point[0], point[1])])
print(f'Total coordinates after filtering: {len(points_list[0])} (selected Topic) {len(points_list[1])} (all)')