You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes the number of parcel geometries in voronoi exceeds number of building geometries in block. This is fairly rare (under 5% of blocks and usually only a difference of 1).
Because very rarely: np.sum(pygeos.get_num_geometries(block_parcels)) > len(pygeos.get_num_geometries(block_parcels))
To rectify this issue, just change line 134 and other spots to len(pygeos.get_num_geometries(block_parcels)) for it to equal building geometry count.
Mechanically, what is likely happening is that there are occasionally multi-polygon geometries created in the tessellation process, so a single building can be in a multipart parcel geometry. The way its set up now should not affect K (since multipart parcel geometries are treated together as a group), however it does change the interpretation of the building_layers column to mean "number of parcel geometries in each layer" (instead of number of building geometries in each layer) and the building_count column reflect total number of parcel geometries in block.
At a minimum these columns should be renamed or use length if the conceptual definition should be building based.
Sometimes the number of parcel geometries in voronoi exceeds number of building geometries in block. This is fairly rare (under 5% of blocks and usually only a difference of 1).
Cause of unexpected behavior is here: https://github.com/mansueto-institute/kblock/blob/main/kblock/batch_4_compute_k.py#L134
Because very rarely:
np.sum(pygeos.get_num_geometries(block_parcels)) > len(pygeos.get_num_geometries(block_parcels))
To rectify this issue, just change line 134 and other spots to
len(pygeos.get_num_geometries(block_parcels))
for it to equal building geometry count.Mechanically, what is likely happening is that there are occasionally multi-polygon geometries created in the tessellation process, so a single building can be in a multipart parcel geometry. The way its set up now should not affect K (since multipart parcel geometries are treated together as a group), however it does change the interpretation of the
building_layers
column to mean "number of parcel geometries in each layer" (instead of number of building geometries in each layer) and thebuilding_count
column reflect total number of parcel geometries in block.At a minimum these columns should be renamed or use length if the conceptual definition should be building based.
See attached CSV for edge case blocks.
check.csv
The text was updated successfully, but these errors were encountered: