Skip to content
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

Add includeEnd into the totalFrameCount game #53422

Closed
wants to merge 1 commit into from

Conversation

rduivenvoorde
Copy link
Contributor

Layers with instantanous events (zero length, e.g. vector or mesh layers) missed the last events because totalFrameCount was off by one.

To fix the totalFrameCount, we add a microsecond to the temporal project extent, ONLY when there is a chance that there are any instantaneous events which are ON the temporal project extent.

We trigger the addition of the microsecond by going over alls layer and check for potential events ON the temporal project extent. If so we let the calculateTemporalRangeForProject return a QgsDateTimeRange which includes the end.

This fixes for example: #48942

To see it yourself, load both netcdf files from this zip.
3steps.zip
Both have 3 datasets but ugrid3timestepstart24.nc received just 2 steps.

This is also reproducable with a csv with instantanous events (without a length).

The drawback of this pull is that it sometimes adds one step extra...

THIS PR supersedes: #52857 which ALWAYS added the extra time step.
Personally I prefer that PR, as it is simpler.

@github-actions github-actions bot added this to the 3.32.0 milestone Jun 9, 2023
@rduivenvoorde
Copy link
Contributor Author

rduivenvoorde commented Jun 12, 2023

@nyalldawson what about this solution? I prefer #52857 for it's simplicity to be honest.
I do not know the use cases but the I prefer having one frame too much over one frame too few.
(All I is want is my data to be shown :-) so I can go on and add a mdalprovider related fix)

@rduivenvoorde rduivenvoorde added the Temporal Temporal filtering or animation label Jun 12, 2023
@rduivenvoorde rduivenvoorde reopened this Jun 12, 2023
@rduivenvoorde rduivenvoorde force-pushed the fixFrameCount branch 2 times, most recently from 6df6662 to 7b55d66 Compare June 12, 2023 12:56
Layers with instantanous events (zero length, e.g. vector or mesh layers)
missed the last events because totalFrameCount was off by one.

To fix the totalFrameCount, we add a microsecond to the temporal project
extent, ONLY when there is a chance that there are any instantaneous
events which are ON the temporal project extent.

We trigger the addition of the microsecond by going over alls layer and
check for potential events ON the temporal project extent.
If so we let the calculateTemporalRangeForProject return a
QgsDateTimeRange which includes the end.
@rduivenvoorde
Copy link
Contributor Author

Ping?

@github-actions
Copy link

github-actions bot commented Jul 5, 2023

The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check

  • that all unit tests are passing

  • that all comments by reviewers have been addressed

  • that there is enough information for reviewers, in particular

    • link to any issues which this pull request fixes

    • add a description of workflows which this pull request fixes

    • add screenshots if applicable

  • that you have written unit tests where possible
    In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request.
    If there is no further activity on this pull request, it will be closed in a week.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Jul 5, 2023
@github-actions
Copy link

While we hate to see this happen, this PR has been automatically closed because it has not had any activity in the last 21 days. If this pull request should be reconsidered, please follow the guidelines in the previous comment and reopen this pull request. Or, if you have any further questions, just ask! We love to help, and if there's anything the QGIS project can do to help push this PR forward please let us know how we can assist.

@github-actions github-actions bot closed this Jul 13, 2023
@rduivenvoorde rduivenvoorde mentioned this pull request Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Uh oh! Seems this work is abandoned, and the PR is about to close. Temporal Temporal filtering or animation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant