-
Notifications
You must be signed in to change notification settings - Fork 20
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
Out of bounds and empty tiles consideration (204, 404, 400; Full & Empty tiles) #21
Comments
Potential reasons for not returning a 204:
|
I think that even if the requested tile falls outside of the global TileMatrixSet definition altogether, a 404 response would be better. It's more compatible with lazy clients that might not bother clipping tile requests to the TileMatrixSet bounds, and is also easier for servers, since its potentially one less thing for them to check during the processing of a tile request. It allow keeps the possibility open for file-system-only tile servers. I think it's conceptually better, too. I think each of these requests should result in a 404: /collections/myCollection/map/myStyle/tiles/dfndffgh (Where /collections/myCollection/map/myStyle/tiles/3/6/5 would result in a 200.) In general, if the path doesn't point to a resource, it should be a 404. |
I like the idea of an optional 'Empty all the way zoomed in' hint in the response header. I'm not as sure of the value of a 'Completely full tile' hint though, since its usefulness would be limited to blandly-styled polygon-based layers. |
@pomakis in fact I think the completely full is more useful than the completely empty. |
These hints were proposed as a way to "avoid having to request the levels further down and save tons of requests". For map tiles, a completely empty tile is simply a fully-transparent tile (or possibly a solid tile in the style's background color). Such tiles can exist in any mappable data set (including coverage data sets that aren't a complete coverage of the world), and there are usually quite a lot of them. But a "completely full" tile? What does that even mean? It's mostly meaningless for coverage layers, and for layers that render points or line data. An inner tile of a filled polygon can be said to be "completely full", sure, but full of what? Only if the polygon fill is a solid (i.e., "bland") color would this flag be of any use. Because if there's any color gradient or fill pattern, the higher-zoom-level tiles will be different. That's why I think a 'Completely full tile' hint would have far less utility than an 'Empty all the way zoomed in' hint. |
@pomakis I am referring specifically to polygon vector tiles. But yes I realize there could be other uses for this with coverage and map tiles as you point out, which in that case would possibly benefit more from marking "empty" -- but what you call a full solid color, as opposed to transparent, would be the "full" equivalent to me in raster, but I believe the greatest value for this is the inside of polygons (as has been shown many times with OpenStreetMap where special background tricks must be used to render land or ocean). But this would provide a clean and elegant approach to storing vast polygon vector tiles. |
We still do not have a solution to the problem identified by Item 1 from #21 (comment). If 204 is not appropriate, please suggest an alternative. Item 2 from #21 (comment) is already covered by Clause 7 (through a 404 code). I think we can update the section with Item 3 from #21 (comment). Any objection? |
There are 2 places were they generated tiles and return 204: The https://tools.ietf.org/html/rfc7231#section-6.3.5 seems to suggest the convenience to use this in PUT but does not prevent to use it in GET We tested chrome and firefox and force them to manage a 204 with: https://httpstat.us/204 and they react by defaulting to the previous page (in contrast to 404 that remains in the page showing the message (and the reason?) In 2020-11-05 telco we decided this:
|
The remaining part of the recommendation we did not address today concerns large polygon datasets where the vast majority of the tiles are either empty or full (e.g. the global landmass). The suggestion is that something in the response header could indicate that there is no point in requesting tiles at deeper zoom levels, because you will get back either a full (completely inside the polygons) or empty (completely outside the polygons) resonse. Similar capability would be needed as well for storing this information, and this would result in very substantial bandwidth/storage savings (probably something like 95% savings with a polygons dataset generated from OpenStreetMap Regarding empty, when getting a an empty response at say level 5, it can either mean that there's is nothing at this level because any features present are too small to be seen at this zoom level, or it could mean that there really is nothing within this tile extent at all in this dataset at any zoom level (the latter case is what the client could be informed of with a particular response header). |
Last comment does not modify the resolution. |
Filed the second part about indicating whether tiles are empty/full all the way down as separate issue #63 . |
Since the second part is now a separate issue and the first part has been addressed in the document, I'll close this issue. |
The recommendation would be that a 204 return code could optionally be returned by the server, assuming the requested tile was within the TileMatrixLimits. This would allow 0 bytes responses for media types which cannot be 0 bytes. There are some arguments about whether that is proper or not for a GET request, but the HTTP specification does say that is valid, but there must not be any content returned.
When a requested tile falls outside the TileMatrixLimit, but within the overall global TileMatrixSet definition, a 404 should be returned (this should be in line with current draft specs).
However if the tile falls outside of the global TileMatrixSet definition altogether, a recommendation is that a 400 would be more appropriate (this may not be reflected right now in the draft specs).
Also, a suggestion for two optional tile statuses, which could be included as a response header:
The text was updated successfully, but these errors were encountered: