-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nodes._status()
-- 'new'
in pandas.Series
always False due to evaluation
#93
Comments
How come the sum of value counts above is different? |
In [1]: (549 + 125 + 95) == (549 + 209 + 11)
Out[1]: True
In [2]: (549 + 125 + 95)
Out[2]: 769
In [3]: (549 + 209 + 11)
Out[3]: 769 They are equivalent, no? |
I can't count.... |
So if While this does not have a direct impact on geometries being generated, it does have a meaningful impact on geometry labeling, which then could affect the algorithm (from my understanding). I'd say we need to figure this out before I continue with testing/refactor and transfer functionality to |
No idea... |
Confirmed programmatically there are no instances of passing in a |
So I guess we need to determine if our logic of "new" vs. "changed" is sound. Currently: def _status(x: pd.Series) -> str:
"""Determine the status of edge line(s)."""
if len(x) == 1:
return x.iloc[0]
if "new" in x:
# This logic is here just to be safe. It will be hit if we create a new line
# and in a subsequent step extend it which is not what normally happens.
# All the new bits are caught likely by the first ``if``.
return "new"
return "changed" ... a linestring geometry is considered "new" only So:
@martinfleis @anastassiavybornova Do yall concur with this logic? |
I think that's right, yes. |
Following #83 (and @martinfleis's explanation there) I want to triple check the correctness of the
'new' in ...
condition innodes._status()
. Currently this will never evaluate toTrue
since it is passed in as apandas.Series
:For the small test case of Apalachicola, FL the results of
'_status'
change as follows:current
main
--'new' in x
:updated condition --
'new' in x.values
:This of course affects the full scale FUA testing for
'_status'
labeling.xref:
nodes._status()
-- ensure coverage #92The plot here highlights the difference where:
It does appear that the results from the original condition are the most correct where lines that are extended are not marked as entirely new. So I am pretty sure our current implementation is accurate, but we should be absolutely sure.
Data:
The text was updated successfully, but these errors were encountered: