CesiumGS / CesiumGS/cesium

wrong image from wms at certain zoom levels

Open
#7,994 4 comments 0 reactions 0 assignees View on GitHub
category - terrain and imagery type - bug
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

Hi,

I'm trying to serve a COG (GeoTiff) through WMS via GeoServer and view it in Cesium (v1.59).
It seems that for some maps, at certain zoom levels it shows some wrong tiles at some zoom level.

I've created a small (650KB) COG file (x[35.4,35.6]_y[31.6,31.8].cog.tif) to demonstrate the problem.
There is no problem with the internal overviews as you can see via QGIS or OpenLayers.

Loading the file through QGIS as a file layer works fine.
Serving the file as WMS via GeoServer and loading the layer via [QGIS or OpenLayers layer preview] also works fine.

Loading the layer via cesium demonstrates the problem.
Steps to reproduce:
1. Serve the raster layer via GeoServer [I used the latest geoserver-2.15.1 with CORS enabled, same I get the same results with many older versions]
2. Load the layer via cesium using the attached script
3. Zoom into the extent of the layer and zoom in and out around the north area of the lake (around 35.5,31.7) (It could be a bit hard to spot the raster on the glob as its extent is small)
4. You will notice that some tiles are not in the correct places at a certain zoom level. zoom in/out and the problem disappears.

Browsers tested:
Chrome Version 75.0.3770.100 (Official Build) (64-bit) on Windows 10
Firefox 67.0.4 (64-bit) on Windows 10

attached:
2 screenshots
1 cesium html file
[Cesium-wms-bug_html.zip](https://github.com/AnalyticalGraphicsInc/cesium/files/3385886/Cesium-wms-bug_html.zip)
1 tif file.
[x[35.4,35.6]_y[31.6,31.8].cog.zip](https://github.com/AnalyticalGraphicsInc/cesium/files/3385885/x.35.4.35.6._y.31.6.31.8.cog.zip)

Thanks,
Idan.

Bug appears:
![screenshot-with-bug](https://user-images.githubusercontent.com/26349741/61124211-00bb0780-a4af-11e9-8d1d-bd631c1a0e11.jpg)

Bug disappears after zooming:
![screenshot-without-bug](https://user-images.githubusercontent.com/26349741/61118396-54265900-a4a1-11e9-99b7-6dfcb30d8419.jpg)

gdalinfo:

Size is 2330, 2330
Coordinate System is:
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]]
Origin = (35.399923324584961,31.800012588500977)
Pixel Size = (0.000085830688477,-0.000085830688477)
Metadata:
AREA_OR_POINT=Area
DESCRIPTION=Sentinel-2 cloudless - https://s2maps.eu by EOX IT Services GmbH (Contains modified Copernicus Sentinel data 2016 & 2017)
IDENTIFIER=Sentinel-2 cloudless
ZOOM_LEVEL=13
Image Structure Metadata:
COMPRESSION=YCbCr JPEG
INTERLEAVE=PIXEL
SOURCE_COLOR_SPACE=YCbCr
Corner Coordinates:
Upper Left ( 35.3999233, 31.8000126) ( 35d23'59.72"E, 31d48' 0.05"N)
Lower Left ( 35.3999233, 31.6000271) ( 35d23'59.72"E, 31d36' 0.10"N)
Upper Right ( 35.5999088, 31.8000126) ( 35d35'59.67"E, 31d48' 0.05"N)
Lower Right ( 35.5999088, 31.6000271) ( 35d35'59.67"E, 31d36' 0.10"N)
Center ( 35.4999161, 31.7000198) ( 35d29'59.70"E, 31d42' 0.07"N)
Band 1 Block=256x256 Type=Byte, ColorInterp=Red
Overviews: 1165x1165, 583x583, 291x291, 146x146, 73x73, 36x36, 18x18, 9x9, 5x5, 2x2, 1x1, 1x1
Band 2 Block=256x256 Type=Byte, ColorInterp=Green
Overviews: 1165x1165, 583x583, 291x291, 146x146, 73x73, 36x36, 18x18, 9x9, 5x5, 2x2, 1x1, 1x1
Band 3 Block=256x256 Type=Byte, ColorInterp=Blue
Overviews: 1165x1165, 583x583, 291x291, 146x146, 73x73, 36x36, 18x18, 9x9, 5x5, 2x2, 1x1, 1x1

Contributor guide

Open the contributing guide

Research direction

Start by running the attached Cesium HTML example against the supplied GeoServer WMS and COG GeoTIFF, then reproduce the misplaced tiles while zooming around 35.5,31.7. Compare the behavior across zoom levels and inspect the Cesium WMS imagery/tile entry point used by the example. Done means the supplied raster remains correctly positioned at every tested zoom level.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.