Volume + Population #14
Replies: 4 comments 5 replies
-
Hey @AdrianKriger, Thank you so much 🙌
No, that's not necessary. This is, in particular, because certain statistics were build to be reliable despite the input's validity. For instance, we compute the AABB, OBB and convex hull volume already, which are going to be correct despite the topological correctness of the model. As per here, you can run val3dity against your dataset before. and then pass that report as an argument if you want to inherit this information to the statistics. We implemented that in particular as we wanted to run stats on all buildings, but then be able to know for which we can trust all metrics and for which it makes sense to only look at the subset of robust metrics (like the volumes mentioned before).
Can you point me in the right direction please? |
Beta Was this translation helpful? Give feedback.
-
Is this what you had in mind @liberostelios -> here? While nowhere near the quality and scale of @Athelena and @fbiljecki work; I would really appreciate their direction and advice. |
Beta Was this translation helpful? Give feedback.
-
Sorry @AdrianKriger, I noticed I missed many of your previous posts. I have no opinion on how to estimate the population explicitly. My suggestions are purely around the geometric manipulation of the data. If you have a 3D.cityjson and you load it somewhere, you can simply iterate through all the CityObjects and create a dictionary and then use a import pandas as pd
from geopandas import GeoDataFrame
# Assuming cm is your city model
data = {}
for obj_id in cm["CityObjects"]:
data[obj_id] = {
**data[obj_id]["attributes"],
"geometry": to_shapely(data[obj_id]["geometry"][0], cm["vertices"], ground_only="True")
}
gdf = GeoDataFrame(pd.DataFrame.from_dict(data, orient="rows")) The code is a little rough and might need some fixing here and there (I didn't test it) but should work. |
Beta Was this translation helpful? Give feedback.
-
I carried the footprint from OpenStreetMap through the CityJSON, as an attribute, and then harvested that. |
Beta Was this translation helpful? Give feedback.
-
As always: your work is pretty awesome. Thank you.
No non-manifold (missing vertices) / polygon wrong direction errors?
I have failed to create a topologically correct model. Since I want to calculate metrics for a ‘primitive’ LoD1 dataset are their other methods to determine a volume without ‘bucky’ libraries?
Would
scipy.spatial.ConvexHull(points).volume
[volume.py line 80] do the business?What about shared walls / nearest neighbour?
Beta Was this translation helpful? Give feedback.
All reactions