Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

getTimeStringForCapabilities() can't handle yearly or monthly intervals properly #41

Closed
WeatherGod opened this issue Jul 22, 2022 · 5 comments

Comments

@WeatherGod
Copy link

public static String getTimeStringForCapabilities(List<DateTime> times)

The algorithm here works by joining together contiguous intervals of equal time as measured by milliseconds. This results in "weird" lists for monthly datasets because only December-January and July-August are equal in time.

As an example, for my monthly dataset, even though "timeInterval" is set to true in wmsConfig.xml, I get the following in my capabilities document, which is mostly a list which is likely to cause confusion.

<Dimension name="time" units="unknown" multipleValues="true" current="true" default="2022-05-01T00:00:00.000Z">
 2020-01-01T00:00:00.000Z,2020-02-01T00:00:00.000Z,2020-03-01T00:00:00.000Z,2020-04-01T00:00:00.000Z,2020-05-01T00:00:00.000Z,2020-06-01T00:00:00.000Z,
2020-07-01T00:00:00.000Z/2020-09-01T00:00:00.000Z/P31D,2020-10-01T00:00:00.000Z,2020-11-01T00:00:00.000Z,
2020-12-01T00:00:00.000Z/2021-02-01T00:00:00.000Z/P31D,2021-03-01T00:00:00.000Z,2021-04-01T00:00:00.000Z,2021-05-01T00:00:00.000Z,2021-06-01T00:00:00.000Z,
2021-07-01T00:00:00.000Z/2021-09-01T00:00:00.000Z/P31D,2021-10-01T00:00:00.000Z,2021-11-01T00:00:00.000Z,
2021-12-01T00:00:00.000Z/2022-02-01T00:00:00.000Z/P31D,2022-03-01T00:00:00.000Z,2022-04-01T00:00:00.000Z,2022-05-01T00:00:00.000Z
 </Dimension>

As a side note, it appears that setting timeInterval to false doesn't do anything? I get the same result either way (using tds 5.4-snapshot docker image)

@haileyajohnson
Copy link

Hi @WeatherGod , this repository is no longer under active development and will be archived when we end support for TDS 4.6.x.

TDS 5.x uses edal-java for wms, which is forked from this external repo. Most wms-related bugs will need to be reported there.

However, we are aware of the timeInterval parameter not working as expected and are looking into it.

@WeatherGod
Copy link
Author

Thanks, I'll track it down in edal and see if it is the same cause or not and open an issue there.

@WeatherGod
Copy link
Author

WeatherGod commented Jul 22, 2022

Actually, I'm not clear how capabilities_xml.jsp finds getTimeStringForCapabilities(). The tld file associates this function with the class defined here, but I don't see the function there.

Shall I go ahead and just open an issue in edal-java and let you all figure it out, or what would you advise?

@haileyajohnson
Copy link

Yes, either open an issue on the main edal-java repo or the tds repo (if your issue is a thredds problem)

@WeatherGod
Copy link
Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants