Open sfo opened 1 year ago
Thank you for the update.
Indeed, that structure is not great now 😢 It would need a serious refactoring that has not been done yet (and it's too late for tonight 😇 to start that!)
It's not very natural to model the whole list of runways with a dataframe because the thresholds come by two (and you need the two thresholds to plot the whole runway for instance)
The .data
attribute is not an attribute but a property, which computes a view on which you use .compute_xy()
to get the x,y
parameters, build a new dataframe but the proper way to instantiate a RunwayAirport
class should be from a list of pairs of thresholds.
This is obviously not great, but I never took time to think about how to improve it.
.data
view as the base structure) breaks the link between the thresholds.geometry
feature could make sense, but then, we should think about distinguishing iteration on runways and iteration on thresholds (and it could be a pain to come back to thresholds from the geometry... wouldn't it?)Honestly I don't know... So I am not really enthusiast about merging this as is, because even if "of course it wouldn't really hurt", it would be just a "band-aid on a wooden leg" (French colloquialism 🤷)
I would be more than happy to convert that into an issue and think about how to improve that part of the library though!
What do you think?
This PR intends to add support for projecting threshold coordinates using the common
compute_xy()
interface.However, currently the
RunwayAirport()
constructor just swallows the enriched DataFrame passed to it at the end ofcompute_xy()
. Consequently, the following code returnsNone
:The DataFrame containing the projection can be accessed via
I am currently not sure how to propagate the results of the projection back up the runway/threshold data stream.