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
This isn't a bug as such, but it is the root cause of an error that's taken me ages to get to the bottom of and could potentially benefit from a warning (if this isn't too difficult to implement).
When generating an enclosed tessellation with momepy.Tessellation, on occasion some of my resulting geodataframes will have seemingly empty rows. After much investigation, I've realised that it's because the procedure I was following (using a small subset of my data for quick prototyping) led me to pass momepy.Tessellation a set of enclosures, and a set of buildings which included some outside of these enclosures. This was an error on my part, but it didn't stop momepy.Tessellation from running and passed unnoticed until much further down the line, by which point it wasn't obvious where the eventual error was coming from.
Here is a notebook showing what I did and the issue that resulted – the main 'error' (although it's not quite that) can be seen in the difference between these two valid and invalid/empty cells:
It's an edge case issue (eg this wouldn't happen if I'd used the city boundary as the edge of the enclosures and not a convex hull around the streets) and not an error as such, but it's taken me sufficiently long to get to the bottom of that I thought it worth flagging up!
The text was updated successfully, but these errors were encountered:
I'd say that the optimal solution would be to drop these empty columns. There will never be any geometry anyway. If you want to do a PR and add this check&drop after this line, that'd be very welcome.
Hey, I'll close this as they are no empty rows in the resulting tessellation. Rows for buildings outside of enclosures are not present at all. When you do enclosed_tess["uID"] == 2169, it returns all False, hence empty dataframe if you use it as indexer.
This isn't a bug as such, but it is the root cause of an error that's taken me ages to get to the bottom of and could potentially benefit from a warning (if this isn't too difficult to implement).
When generating an enclosed tessellation with
momepy.Tessellation
, on occasion some of my resulting geodataframes will have seemingly empty rows. After much investigation, I've realised that it's because the procedure I was following (using a small subset of my data for quick prototyping) led me to passmomepy.Tessellation
a set of enclosures, and a set of buildings which included some outside of these enclosures. This was an error on my part, but it didn't stopmomepy.Tessellation
from running and passed unnoticed until much further down the line, by which point it wasn't obvious where the eventual error was coming from.Here is a notebook showing what I did and the issue that resulted – the main 'error' (although it's not quite that) can be seen in the difference between these two valid and invalid/empty cells:
It's an edge case issue (eg this wouldn't happen if I'd used the city boundary as the edge of the enclosures and not a convex hull around the streets) and not an error as such, but it's taken me sufficiently long to get to the bottom of that I thought it worth flagging up!
The text was updated successfully, but these errors were encountered: