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

enable time filtering when metadata contains a timeInfo object #175

Open
ButchGis opened this issue Jan 25, 2020 · 2 comments
Open

enable time filtering when metadata contains a timeInfo object #175

ButchGis opened this issue Jan 25, 2020 · 2 comments

Comments

@ButchGis
Copy link
Contributor

When timeInfo object was defined in provider metadata and (esri) client then sends query with time = 'epochsecondsStart, epochsecondsEnd'. I am doing a cached provider and was surprised that while I had defined the timeInfo object my returned results where not filtered for time.

It looks like the time option is not being handled by FeatureServer.

So I wonder where we would best handle time as passed in from an esri client when a provider sets a metadata timeInfo object?

I found the easiest place to 'monkey patch' it in was actual on the cache and not on FeatureServer. However this may not be the best or most koop way to design this.

Here's what I did to get this working in a fork of the cache project: koop-cache-memory.

@rgwozdz
Copy link
Member

rgwozdz commented Jan 31, 2020

Yeah, I would not want to put this on cache. It would then have to be implemented on every cache-plugin. Also, the cache plugin shouldn't be responsible for filtering. This should be a part of FeatureServer/Winnow.

If you want your cache to store filtered data you need to do that filtering in your provider before the geojson is passed on to the callback. You can either have the remote API do such filter, or do the filtering yourself once you get the remote data. Some providers use Winnow library to do this; if you properly set the filtersApplied property, then FeatureServer won't try to filter the data a second time.

@ButchGis
Copy link
Contributor Author

ButchGis commented Feb 1, 2020 via email

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

No branches or pull requests

2 participants