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

WMS Raster Overlays missing from some tiles when zoomed out #809

Open
corybarr opened this issue Feb 12, 2024 · 3 comments
Open

WMS Raster Overlays missing from some tiles when zoomed out #809

corybarr opened this issue Feb 12, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@corybarr
Copy link
Contributor

This issue can be reproduced in Omniverse or Unreal.

When zooming out, WmsRasterOverlay imagery disappears from tiles seemingly with an origin beyond some distance threshold.

Omniverse vid: https://github.com/CesiumGS/cesium-native/assets/1040194/5b35c90b-47aa-4458-8e9d-8bf671c9b29c

Screenshot of the same settings in Unreal: image

Here are the settings to reproduce in Unreal:

image

CesiumWebMapServiceRasterOverlay settings:

image

@corybarr corybarr added the bug Something isn't working label Feb 12, 2024
@corybarr
Copy link
Contributor Author

@kring mentioned "It's common for WMS servers to return blank tiles when zoomed out too far." The "bug" label might be incorrect. It would be a product decision to add support for UI notification via GetCapabilities (as @kring mentioned Terria does) or leave as is.

@kring
Copy link
Member

kring commented Feb 12, 2024

Yeah this is unfortunately intentional (if infuriating) behavior from the server. If you look at the server's GetCapabilities:
https://mapprod3.environment.nsw.gov.au/arcgis/services/Planning/EPI_Primary_Planning_Layers/MapServer/WMSServer?service=WMS&request=GetCapabilities
You'll see it has properties like this:

<MaxScaleDenominator>472470.238095</MaxScaleDenominator>

In the WMS 1.3.0 spec (https://www.ogc.org/standard/wms/) section 7.2.4.6.9, it says:

Upon receiving a request for a map that is not within the scale denominator range, the server may return a blank map, or may return a portrayal of the Layer that is crowded with features or otherwise poorly suited for display; the server shall not respond with a service exception.

So when the scale of the map is deemed to be more zoomed out than 1:472470.238095, it will return blank images. Annoying but true. People running servers configure them to do this for one of two reasons:

  1. Because this layer is meant to be shown alongside other layers, and they think it would add too much clutter when zoomed out, so they turn it off, or
  2. Rendering the large numberf of features when zoomed out would put a lot of load on the server, so they simply tell the server not to do it. Remember that most WMS servers render maps on demand by querying features from a geodatabase and rasterizing them according to styling rules. When zoomed out, there can be a huge number of features included in the tile.

Long story short, this is working as expected. Pretty much the best we can do is inform the user that it's happening so they're somewhat less likely to wonder why their map isn't showing up. But to do that, we'd have to know about the MaxScaleDenominator, which would require actually querying the GetCapabilities and doing the computation to turn that map scale into something meaningful in our raster-images-mapped-to-3D-Tiles world. Currently, like CesiumJS, cesium-native doesn't look at the GetCapabilities at all.

@csciguy8
Copy link
Contributor

csciguy8 commented Apr 8, 2024

Could we do something simple, like log a warning (or info message) when using a WmsRasterOverlay and the image is blank?

"Raster overlay image is blank, you're probably zoomed out too far".. or something like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants