-
Notifications
You must be signed in to change notification settings - Fork 13
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
Implications of supporting scale-factor=1 for static endpoint #190
Comments
A neat way to address this would be to make |
But that does not address the issue of clients requesting the whole coverage which is impossible to return, and the server returning a 4xx error, which we want to avoid, therefore we have a permission to return a downsampled version rather than an error if the client does not explicitly state that it wants the full resolution or an error. Pehaps there could be a special exception to this for servers supporting e.g., COG and |
I feel like that's a non-issue. Requests should be made in an informed manner, otherwise returning an error is totally reasonable. |
The related issue is #54 and we came to a decision 3 years ago on this permission. I disagree that it's a non-issue, as I feel it's important that the canonical At least four of us were in strong agreement with this back when we made this decision. We then had a second motion on this topic. Getting back to my question which would help consider a proper solution, what happens with a typical static object storage if a client makes a request with a query parameter? |
@jerstlouis On one hand " So which is it, I think #54 (comment) highlights the same consideration:
So, If anything, it is the "Requirement: Even if the scaling conformance class is not supported, the server SHALL understand requests specifying Instead, there should be a requirement that indicates that, if a server wants to use an alternate default than |
By "support
We could make that compromise, as there was a previous suggestion to do so. Then we had second thoughts about that. If this really helps the static use case while preserving the permission to downsample if necessary to avoid returning an error, then I'm happy to re-introduce a property like |
Yes. I think that would help at least advertise what would happen, without having to download the data, to figure out which scaling would be applied by default. I think it would be better to have an actual value at the collection level rather than a somewhat meaningless boolean. Something like Omitting |
That would not work, because the scale factor can depend on the subset requested. Requesting a small spatial extent would return the full resolution, but returning the whole coverage can return a downsampled version. |
I see. Makes sense. |
@fmigneault Recommendation 1 mentions |
We discussed the possibility to add a response header, which could also be returned as part of a HEAD request. In general, it seems that the scale-factor=1 approach to enforce a particular scale is not a major issue, and should mostly simply be ignored for static servers (which is the expected behavior) |
So we are running into related issues as well for two different APIs. It is not quite clear to us right now what is allowed in Coverages and what isn't. Is it allowed to return a downsampled version (i.e. non-native resolution) if I submit a Coverages request without any parameters / all parameters being default? I think default values should work as such that you can usually return a response, which means scale-factor should never ever have the default value 1, which would in many cases overload servers and floog users with huge amount of data that they did not explicitly requested. If users diverge from defaults and know hopefully what they are doing so returning larger amounts of data is fine. It may also be that the downsampled version can not be described upfront. Servers may choose limits depending on their abilities to load and process different data, the provided parameters, etc. There may not always be specific values for that. I'd propose that for all default values, the server chooses what is best to return. This leads to different results across implementations of course. If you want predictable results you need to specify specific values for the parameters. In this case you may return errors whenever the users requested too much information. cc @jankovicgd |
Yes, that's what the downsampling permission is about.
In implementations that do not support downsampling, then
Exactly, this is why the server limit are exressed in terms of total number of cells, width, and height. (Recommendation 1 about limits)
That's exactly what the draft says! :) |
Thanks.
Strictly speaking that should be in the Core conformance class (additionally?). Just having that in the scaling conformance class means I can't downscale in core?!
Default values should not depend on other criteria, at least from a specification point of view. It seems the default value for scale-factor must be undefined, i.e. the server decides. Which leads to the downsampling permission, which should be in Core. |
Correct. If the server supports downscaling, then it should implement the Scaling requirements class.
Yes, the default value is "none specified" / "varying" / "undefined".
Why would the server return a downsampled version when it does not support downsampling? Are you thinking of a use case where there are only a limited set of pre-defined scales, and the server can either return the low-resolution or higher-resolution version? Coverages doesn't handle that "in-between" use case. Either the server does not support downsampling, in which case it can return an error if the user asks for too big of an area or the whole thing, or it supports downsampling and is happy to downsample to a particular requested resolution resulting in not too much data output. Potentially, if it supports subsetting but not downsampling, and the client didn't request a specific subset, the server could be allowed in that case to return a subset instead of a downsampled version to avoid returning an exception -- not sure this is currently allowed in Coverages, but that is allowed in OGC API - Maps (the default for the subset/bbox is undefined) -- see https://docs.ogc.org/is/20-058/20-058.html#_56e245b6-53bf-4996-b579-062598191edd Tables 8 & 9. |
No! Servers may downscale by default but still can't support the full possibilities of the Scaling requirement class.
Okay, so 7.2.4 Req. 4J is to be understood as follows:
I support downsampling but may not want to support Scaling or not all options that Scaling requires are possible to be implemented. As such I can't advertise it as supported. I requested splitting it into easer/smaller chunks, but you also don't want that?! So I'm out of options. See #194
No, but that would be another possibility, indeed. |
At the moment, if Scaling is NOT supported,
We clarified some of this in #187. There should not be anything impossible to implement. I feel like the solution is to clarify this, perhaps providing guidance how these different options map to the same thing? There should be a relatively simple way to map all required parameters to existing capabilities, if the backend does support some kind of downsampling for all dimensions. Could we discuss your use case in more detail? (in #187 if it is related to the temporal dimension).
I am much less opposed to splitting temporal vs. spatial chunks (whether subsetting or scaling) than convenience vs. a more general way to do the same thing, because from an implementation perspective implementing a convenience parameter is simply parsing a parameter and re-routing it to the same underlying functionality -- not a big ask for server developers, which gives more freedom to clients and direct-in-the-browser API users, while maintaining interoperability. |
That makes no sense to me, so I'd appreciate to discuss this:
That's one of the issues, but doesn't cover all potential issues.
That would probably help, not sure it solves all blockers though.
Just trying to implement spatial scaling on top of GEE right now. Not sure about @jankovicgd's usecase. So I can set width + height + bbox or a scale (in CRS resolution). I don't always know what the native resolution is and I don't know the number of sample values, I think. How can I map all parameters that scaling provides?
I guess the issue is that scale-axes and scale-factor are both ratios, but there's no way to just set a specific resolution value (e.g. 20m)?! Additionally, I can only work in a meaningful way on the spatial dimensions as discussed in #187.
That's not how it is defined. If I have bbox + datetime implemented, I can not just redirect subset to those parameters and have a compliant server. Subset allows much more, so it's not a simple redirect. (Sorry, we are drifting into off-topic here, I think.) |
If there are any blocker left, that could justify moving the permission to Core, but I think first we should first address the possibility to implement Scaling.
We did discuss the possibility to add a Again all these
That certainly would be a problem, but that's already a problem in terms of describing the coverage in the spatial extent of the collection description. A regularly gridded coverage has a resolution (Requirement 27 in the OGC Abstract Specification Topic 6 - Part 1). Isn't there something like https://developers.google.com/earth-engine/apidocs/ee-projection-nominalscale that can always be queried? In cases where you really cannot know, I guess you would have to assume a detailed value that's likely to be large enough, and you would report that as the resolution in the collection description.
It would normally be the other way around - the redirect should be from But if the collection only has spatial and temporal dimension, the only extra thing that
We clarified how things should be done for the temporal dimension on irregular grids -- I need to update the requirements to reflect that. If you can support something like |
For me this request has nothing to do with my specific implementation details. I think this should just be generally the case from an UX perspective. Default request should always return something reasonable, usually not overload servers or users. This usually means by default some kind of downscaling (or often just using different level of pyramids without actual downscaling).
Yeah, I said before I don't like the 100 ways of doing things and require 100 things to implement a conformance class.
Not asking to remove anything, just let people pick. But sometimes it's also a question of refreshing things and not keep all the old legacy stuff around forever which makes things klunky the longer things evolve. Are all these parameter really needed? Can't clients just do the computation? Yeah, I'm a client fan and OGC historically has heavy focus on servers (which I think is pretty bad and must change, but just my 2ct.)
I might be able to get the resolution, but not the number of cells. I also noticed that that's an issue for the UMD and thought I had opened an issue. Maybe forgot about it.
Well, I have an unnormal case then. But as OGC always tries to cater for everyone: here we go...
I was thinking more about the other dimensions, if any... |
The most detailed one (10m). See also #142 where I proposed a new
The spatial extent divided by the resolution should give the number of cells (+1 cell for regular point coverage).
Is that a difficulty with the underlying data store to dimensions other than space and time (even though additional dimensions are supported)? |
SWG 2024-11-27: Here are the actions that we decide to take to address this issue:
|
I'll suggest to add a permision in the core saying something like: Servers that do not implement scale-factor class are allowed to declare a scale-factor with the only possible value of 1 to allow clients to request scale-factor=1 to be sure that the server is not rescaling the data. This permission is compatible with the OWS Common and the need for returning 4xx for any parameter that is not declared in the API definition. |
Currently, we require implementations to still support
scale-factor=1
, even if not support the Scaling requirement class, so clients have a general way of requesting the original resolution of the data without any resampling applied. This is to allow servers to automatically return downsampled data if asking for/coverage
and the entire coverage is too much for a response without any subsetting or resampling, and so that the link from the collection to the coverage is not a 4xx error (which gives a bad impressions to users following the link, and may negatively affect SEO etc.).Is this requirement to support
scale-factor=1
a significant problem for static cloud storage deployments, or can they simply be ignored?cc @m-mohr
The text was updated successfully, but these errors were encountered: