Tiles from MapProxy on the CesiumGlobe shows gap between the tiles. Why?

581 views
Skip to first unread message

Geoneer

unread,
Dec 2, 2016, 7:15:23 PM12/2/16
to cesium-dev
Hello all,

I'm using MapProxy to create tiles on the client where my webapplication is running the Cesium Globe. I'm pushing tiles from mapproxy tilecache on the globe to show the earth and / or datalayers from PostGIS en Geoserver.

From my BING layer tilecache I get the tiles with a gap between the tiles on the Cesium Globe. 

Does anyone knows why?

I'm using: Cesium 1.28. 

My MapProxy configuration:

# -------------------------------
# MapProxy example configuration.
# -------------------------------
#
# This is a minimal MapProxy configuration.
# See full_example.yaml and the documentation for more options.
#

# Starts the following services:
# Demo:
# WMS:
# WMTS:
# Tile service (compatible with OSM/etc.)
# TMS:
#     note: TMS is not compatible with OSM/Google Maps/etc.
# KML:

services:
  demo:
  tms:
  wms:
    srs: ['EPSG:3857', 'EPSG:4326', 'EPSG:900913']
    image_formats: ['image/jpg', 'image/png']
    md: 
      title: MapProxy WMS Server
      
sources:
  esri:
    type: tile
    grid: e_grid

  gm:
    type: tile
    grid: gm_grid

  gs:
    type: tile
    grid: gs_grid

  ghs:
    type: tile
    grid: ghs_grid

  gt:
    type: tile
    grid: gt_grid

  gtalt:
    type: tile
    grid: gtalt_grid

  gr:
    type: tile
    grid: gr_grid

  gralt:
    type: tile
    grid: gralt_grid

  binga:
    type: tile
    grid: binga_grid
    on_error:
      204:
        response: transparent
        cache: True
      502:
        response: '#ede9e3'
        cache: False
      other:
        response: '#07232f'
        cache: False

  bing_meinshiff:
    type: tile
    grid: binga_grid
    coverage:
      bbox: [7.300,52.834,31.192,63.734]
      srs: 'EPSG:4326'
    on_error:
      204:
        response: transparent
        cache: True
      502:
        response: '#ede9e3'
        cache: False
      other:
        response: '#07232f'
        cache: False


  OSM_Borders:
    type: wms
    wms_opts:
        version: 1.1.1
        featureinfo: True
    req:
        layers: OCULUS:GRP_BORDERS
        transparent: true
        seed_only: false
    
  OSM_Roads:
    type: wms
    wms_opts:
        version: 1.1.1
        featureinfo: True
    req:
        layers: OCULUS:GRP_ROADS
        transparent: true
        seed_only: false
    
grids:

  e_grid:
    base: GLOBAL_MERCATOR
    origin: ul
    
  gm_grid:
    base: GLOBAL_MERCATOR
    origin: ul

  gs_grid:
    base: GLOBAL_MERCATOR
    origin: ul

  ghs_grid:
    base: GLOBAL_MERCATOR
    origin: ul

  gt_grid:
    base: GLOBAL_MERCATOR
    origin: ul

  gtalt_grid:
    base: GLOBAL_MERCATOR
    origin: ul

  gr_grid:
    base: GLOBAL_MERCATOR
    origin: ul

  gralt_grid:
    base: GLOBAL_MERCATOR
    origin: ul

  binga_grid:
    base: GLOBAL_MERCATOR #GLOBAL_WEBMERCATOR
    origin: ul
 
  Borders_grid:
    base: GLOBAL_WEBMERCATOR
    origin: ul
 
  Roads_grid:
    base: GLOBAL_WEBMERCATOR
    origin: ul

caches:
  Roads_cache:
    grids: [binga_grid]
    sources: [OSM_Roads]
    cache:
      type: file
      directory: d:/tiles/Roads
      directory_layout: tms

  Borders_cache:
    grids: [binga_grid]
    sources: [OSM_Borders]
    cache:
      type: file
      directory: d:/tiles/Borders
      directory_layout: tms

  e_cache:
    grids: [e_grid]
    sources: [esri]
    cache:
      type: file
      directory_layout: tms
      
  gm_cache:
    grids: [gm_grid]
    sources: [gm]
    cache:
      type: file
      directory_layout: tms

  gs_cache:
    grids: [gs_grid]
    sources: [gs]
    cache:
      type: file
      directory_layout: tms

  ghs_cache:
    grids: [ghs_grid]
    sources: [ghs]
    cache:
      type: file
      directory_layout: tms

  gt_cache:
    grids: [gt_grid]
    sources: [gt]
    cache:
      type: file
      directory_layout: tms

  gtalt_cache:
    grids: [gtalt_grid]
    sources: [gtalt]
    cache:
      type: file
      directory_layout: tms

  gr_cache:
    grids: [gr_grid]
    sources: [gr]
    cache:
      type: file
      directory_layout: tms

  gralt_cache:
    grids: [gralt_grid]
    sources: [gralt]
    cache:
      type: file
      directory_layout: tms

  binga_cache:
    grids: [binga_grid]
    sources: [binga]
    cache:
      type: sqlite #file
      directory: d:/tiles/BING
      #directory_layout: tms

  bing_meinshiff_cache:
    grids: [binga_grid]
    sources: [bing_meinshiff]
    cache:
      type: sqlite #file
      directory: d:/tiles/BING
      #directory_layout: tms


layers:
  - name: OSM_Roads
    title: OSM_Roads
    sources: [Roads_cache]

  - name: OSM_Borders
    title: OSM_Borders
    sources: [Borders_cache]

  - name: ESRI_layer
    title: ESRI World Images
    sources: [e_cache]

  - name: gm_layer
    title: Test of using GM map tiles
    sources: [gm_cache]

  - name: gs_layer
    title: Test of using GM satellite tiles
    sources: [gs_cache]

  - name: ghs_layer
    title: Test of using GM hybrid satellite tiles
    sources: [ghs_cache]

  - name: gt_layer
    title: Test of using GM terrain tiles
    sources: [gt_cache]

  - name: gtalt_layer
    title: Test of using GM alternative terrain tiles
    sources: [gtalt_cache]

  - name: gr_layer
    title: Test of using GM road tiles
    sources: [gr_cache]

  - name: gralt_layer
    title: Test of using GM alternative road tiles
    sources: [gralt_cache]

  - name: binga_layer
    title: Bing aerial tiles
    sources: [binga_cache]

  - name: bing_layer_meinshiff
    title: Bing aerial tiles for meinshiff
    min_res: 25
    max_res: 0
    sources: [bing_meinshiff_cache]

globals:
   cache:
     meta_size: [4, 4]

   #image:
    # resampling_method: bicubic
     #paletted: false
     #stretch_factor: 1.15
     #max_shrink_factor: 4.0
     #formats:
      # custom_format:
       #  format: imaga/png
        # mode: RGBA
        # colors: 0
        # transparent: true





1.png

Geoneer

unread,
Dec 4, 2016, 6:58:27 AM12/4/16
to cesium-dev
I did find out that the MapProxy tiles get a gap between the tiles on the Cesium Globe just on the lat / lon wireframe. So I 'm thinking it's  'something somewhere' in The projection of the MapProxy tiles on the globe?

If so, where is this processed in Cesium? - Looks like there is created a gutter distance between the tiles automatically by Cesium -
3.png

Geoneer

unread,
Dec 4, 2016, 6:59:03 AM12/4/16
to cesium-dev


On Saturday, December 3, 2016 at 1:15:23 AM UTC+1, Geoneer wrote:
3.png

Geoneer

unread,
Dec 4, 2016, 7:01:15 AM12/4/16
to cesium-dev
4.jpg

Hannah Pinkos

unread,
Dec 5, 2016, 1:04:49 PM12/5/16
to cesium-dev
Hello,

It looks like you might be running into this issue: https://github.com/AnalyticalGraphicsInc/cesium/issues/3710
We hope to have it fixed soon.  We'll post an update when we have a chance to look into the problem.

Thanks,

Hannah

Geoneer

unread,
Dec 5, 2016, 6:08:35 PM12/5/16
to cesium-dev
Ok. I will have a look at the code and try to fix this. For me it's a urgent thing. 

Strange thing is that I've had same situation with Cesium 1.21. Then there was no problem at all on the specific machine with Windows 8.1. I did just copy the whole configuration on my laptop in Chrome with Windows 10. Then I have the problem also with Cesium 1.21.

I think it's something with 'wrapping' the square tile on the globe with a specific function inside Cesium. I've to find out where this is inside the Cesium Stack. 

If anyone knows...  let me know! :-)

Geoneer

unread,
Dec 7, 2016, 7:15:56 PM12/7/16
to cesium-dev
I did fix this issue with the parameter [tilingScheme] in the WebMapServiceImageryProvider. So I give the imageryprovider the knowledge that my tiles are created with the option: 

new Cesium.WebMercatorTilingScheme()


I did use the defauts inside this object.


My code:

// Create an ImageryProvider for the specified URL. Return undefined if the URL is not set.
//
// @param {String} offlineMapProviderUrl The URL of the offline map provider.
// @param {String} layersToShow The layers to show (e.g. 'YE:BING').
function CreateOfflineImageryProvider(offlineMapProviderUrl, layersToShow) {

if (Cesium.defined(offlineMapProviderUrl) && Cesium.defined(layersToShow)) {
var imageryProvider = new Cesium.WebMapServiceImageryProvider({
url: offlineMapProviderUrl,
layers: layersToShow, // The layers to include, separated by commas.
tilingScheme: new Cesium.WebMercatorTilingScheme(), //this is the trick to remove the black lines on the globe from the poles. 
parameters: {
transparent: true, // todo: check.
tiled: false,
format: 'image/png'
},
enablePickFeatures: false // no pickable features for now.
});

return imageryProvider;
}

// No valid URL and/or layers.
return undefined;
}

On Saturday, December 3, 2016 at 1:15:23 AM UTC+1, Geoneer wrote:

Sean Lilley

unread,
Mar 15, 2017, 7:29:30 PM3/15/17
to cesium-dev
Assuming the cracking here is related to https://github.com/AnalyticalGraphicsInc/cesium/issues/3710, it should be fixed now with https://github.com/AnalyticalGraphicsInc/cesium/pull/5021. It will be in the 1.32 release.
Reply all
Reply to author
Forward
0 new messages