-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
TimestampedGeoJson only works if using times that all have the same number of digits in their Unix epoch time #1268
Comments
I haven't tried your data, but it doesn't seem to match the specification in the docstring of |
I've tried passing in all formats I could think of including unix epoch timestamps in ms and ISO timestamps but it only ever works if all dates are either before or after 2002. My theory is that dates are converted to unix epoch timestamps and when it's dealing with timestamps that aren't the same number of digits it doesn't work |
Alright, good to know. I'm quickly looking at the code in What would be helpful if you could provide a small, self-contained code snippet, including a bit of data, that produces your error. |
The code below works fine, but if I change any of these years to 2002 or later it doesn't work. However if all years are 2002 or later it works fine
|
For what it's worth, I was having the same issue until I stumbled on this discussion. I'd love to see how it worked out. I have the same issues, with sample data and real data. It all works fine if my years are all before 2002, or after 2002, but it crashes if the years span 2002. |
This issue is still open. We need someone to figure out what’s causing it. And then someone making a PR with a fix. |
I recently use TimestampedGeoJson plugin to show changes of data varying with time. I found this Problem: Solution: arr = arr.slice(0).sort(function(a, b){return a-b;}); The source code of leaflet.timeddimension on GitHub had been used as this. It maybe some unknown reason that I hope it helps. |
hi, anyone have a solution for this? I'm using the same code but for me the problem is with before and after 9/9/2001, i tried other libraries (but went back to folium because of the aesthetic) and they don't have a similar issue, can't figure this out for a week :( |
@davecao Thanks for the debugging information. That was really helpful. Since it seems the issue is in the underlying socib/timedimension package, I will open an issue there. |
Apparently it was already fixed in the source code of the underlying javascript package, but the new version was never released. |
Hello,
I have used timestampedgeojson extensively and I could not find the way to
troubleshoot the issue you mentioned. Up until now , there is no solution
(at least that I am aware of)
Have you tried leaflet.js overlay animations? There is a couple of options
for markers animation and motion with progress …
Hope this helps. I’m not expert.
…On Sun, 14 Apr 2024 at 2:38 PM BlueCrabsLover ***@***.***> wrote:
hi, anyone have a solution for this? I'm using the same code but for me
the problem is with before and after 9/9/2001, i tried other libraries (but
went back to folium because of the aesthetic) and they don't have a similar
issue, can't figure this out for a week :(
—
Reply to this email directly, view it on GitHub
<#1268 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AR5NF4DCVEBAXLR577QTO7LY5JMC7AVCNFSM4LCN4S62U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBVGQYDAMRYG4ZA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
thanks I'll check it out today, because it looks like I'll have to find another way to do this |
Let us know how it goes … there is an example
With leaflet and timestampedgeojson for satellites flight coordinates
visualization
https://stackoverflow.com/questions/73386025/merge-multiple-folium-timestampedgeojson-timedimensioncontrol-into-one
This is an animated leaflet map with time series , no timegeojson
https://apps.socib.es/Leaflet.TimeDimension/examples/example2.html
Let me know what you think and if any of these examples was helpful
…On Tue, 16 Apr 2024 at 1:00 PM BlueCrabsLover ***@***.***> wrote:
thanks I'll check it out today, because it looks like I'll have to find
another way to do this
—
Reply to this email directly, view it on GitHub
<#1268 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AR5NF4F6YF5RWD6MZNMC2TLY5TSEBAVCNFSM4LCN4S62U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBVHA2TSMRTGA4Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
@cafawo Folium is just a thin wrapper around Leaflet and its plugins. It seems that the issue is in the Leaflet plugin You could have a look at the If you have to use |
We should close this issue, since it should be handled upstream |
data = pd.DataFrame({
'Latitude': [2, 7, 2, 2, -4.03, 2, 36.82, 2],
'Longitude': [49, 66, 49, 49, 5.33, 49, -1.29, 49],
'Count': [40, 12, 22, 3, 23, 30, 100, 200],
'Year': ["1997", "1998", "1998", "1999", "1999", "2002", "2003", "2004"]
})
Since this uses dates both before and after ~2002, it doesn't work. It works if using only dates before 2002 or after 2002 but not both
I assume this is because the number of digits in a Unix epoch time goes up from 12 to 13 around 2002
Is there anything I can do to get it working for all dates?
The text was updated successfully, but these errors were encountered: