TileMapService Position Issue

Dear all,

we're trying to integrate a Tile Map Service in our Cesium web portal.

At the moment we are facing some issue in the visualization/position of the orthophotos tiles of Italy.

The tilemapresource.xml is available at the following URL:

In our Viewer initialization we define a new GeographicTilingScheme as described below:

var tilingScheme = new Cesium.GeographicTilingScheme({
   rectangle: new Cesium.Rectangle(
       numberOfLevelZeroTilesX: 1

and then a new TileMapServiceImageryProvider:

var imageryProvider = new Cesium.TileMapServiceImageryProvider({
   url : ‘http://wms.pcn.minambiente.it/tms/ortofoto_2012’,
   fileExtension: ‘png’,
   maximumLevel: 16,
   rectangle: new Cesium.Rectangle(
       tilingScheme: tilingScheme

The tiles are displayed, but in a wrong location... if we overlap the bing imagery with our tiled orthophoto, we discover that Italy has new island...equals to the big one...:slight_smile:


What is wrong? Have we missed something?

Thank for the support,

Dear all,

I solved this issue... the tiles have been generated via GDAL2Tiles and at the beginning we didn't generate the kml... but it is very usefull...inside there are all the parameters to set up the new tiling schema...

Would you mind sharing alittle more information on how you solved your issue?

Gdal2TIles are a very commonly used tool and since you talk about a different tiling schema I think the information you sit with could be very useful to others.

What would be interesting to me would be what kind of imagery (projection info ect) you are tiling up with Gdal2TIles and the cesium code at the end to display it.

We selected the "geodetic" profile in the tiles generation within Gdal2Tiles.
The tiles cover an area a little bit bigger than the Italy as described in the following parameters of the tileresource.xml:

<BoundingBox minx="6.57865635291269" miny="35.44633084132808" maxx="18.58653175840418" maxy="47.10285061079963"/>
<Origin x="6.57865635291269" y="35.44633084132808"/>
<TileFormat width="256" height="256" mime-type="image/png" extension="png"/>

During the generation of the tiles Gdal2Tiles, create a kml for each tile in order to use them in Google Earth for example.

We have only 1 tile at LOD 0 and inside the kml is reported the bounding box for the tiles in a specific Region, in our case:


Thanks to this information we setup the tilingSchema in Cesium:

tilingScheme = new Cesium.GeographicTilingScheme({
                rectangle: new Cesium.Rectangle.fromDegrees(-180, -90, 180, 270),
                numberOfLevelZeroTilesX: 1

I don't know if it is the right approach and if this works in other cases (with more tiles at LOD 0), but it solved our issue.