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 exactly a bug, but I discovered some rough edges trying to work with the recently added time-dynamic WMS support. I brought it up in #6348 and Hannah asked me to open a new issue, so here it is.
I found this sample data in a related ticket, I think. I'm working on a simple parser for the Capabilities document, so that I can advertise layers to the user and automatically configure the supported time parameters. To that end, I'm looking at the <Dimension name="time"> tag.
On this server, the value of that tag is 2011-02-16/2018-12-31/PT5M. OK, let's set up a new WebMapServiceImageryProvider with times = TimeIntervalCollection.fromISO8601({iso8601: str}). This causes parseDuration to create 828000 JulianDates, one for every 5 minutes over 7 years or so. Of course, the browser seems to hang for a long time while this is happening. But to my understanding, this is the only way of providing the time parameter value that should be sent, based on the simulation Clock's currentTime.
Is there another way to handle this? The WMS spec allows a single, simple string that they call a "range" or "periodic interval", to specify an effectively unlimited number of intervals (0001-01-01/9999-12-31/PT1M), so instantiating each interval described, all at once, seems inefficient. Is there a callback-based way of specifying intervals, so that we just describe the mechanism that maps an instant to an interval once? Are changes needed to the code to support this?
As an aside, I'm working on implementing a TimeIntervalCollection that doesn't actually store individual intervals but rather generates them on-demand based on a start/stop/period argument. I'll let you know how that goes.
The text was updated successfully, but these errors were encountered:
The fromISO8601* functions are just for convenience because date parsing can be a pain. All the functions will eventually call fromJulianDateArray.
You can however just call addInterval at anytime to add the interval. If you are animating via a clock, you can listen to the clock.onTick event to make sure you interval is there in time for us to use it.
Just to give you an idea of what I'm thinking, this class (in TypeScript, but easy enough to transpile, I think) is what I worked out after posting the initial issue. I know it isn't perfect and there are probably some cases where it would not be a drop-in replacement for other uses of TimeIntervalCollection. But for my specific situation -- trying to map simulation time to a TimeDynamicImagery query parameter -- it gets the job done.
This isn't exactly a bug, but I discovered some rough edges trying to work with the recently added time-dynamic WMS support. I brought it up in #6348 and Hannah asked me to open a new issue, so here it is.
I found this sample data in a related ticket, I think. I'm working on a simple parser for the Capabilities document, so that I can advertise layers to the user and automatically configure the supported time parameters. To that end, I'm looking at the
<Dimension name="time">
tag.On this server, the value of that tag is
2011-02-16/2018-12-31/PT5M
. OK, let's set up a newWebMapServiceImageryProvider
withtimes = TimeIntervalCollection.fromISO8601({iso8601: str})
. This causesparseDuration
to create 828000JulianDate
s, one for every 5 minutes over 7 years or so. Of course, the browser seems to hang for a long time while this is happening. But to my understanding, this is the only way of providing thetime
parameter value that should be sent, based on the simulation Clock'scurrentTime
.Is there another way to handle this? The WMS spec allows a single, simple string that they call a "range" or "periodic interval", to specify an effectively unlimited number of intervals (0001-01-01/9999-12-31/PT1M), so instantiating each interval described, all at once, seems inefficient. Is there a callback-based way of specifying intervals, so that we just describe the mechanism that maps an instant to an interval once? Are changes needed to the code to support this?
As an aside, I'm working on implementing a
TimeIntervalCollection
that doesn't actually store individual intervals but rather generates them on-demand based on a start/stop/period argument. I'll let you know how that goes.The text was updated successfully, but these errors were encountered: