north and south pole mapping

Hi there !

I map cesium with a custom tile set on a local server produced with geographic imager.

and I call it in cesium with :

var myown = Cesium.createTileMapServiceImageryProvider({
   url : ‘http://localhost/LTSLT/scripts/cloudXlb/’,
   fileExtension: ‘jpg’,
   maximumLevel: 6,
});

the result is is that the mapping is stretched on north and south pole.
somebody have an idea about that problem ?

Is there any way to prevent that ?

Thanks !

Hey,

Can you show an image of the issue? My best guess is that it could be that the tiles don’t cover the entire globe to Cesium is attempting to use it to fill the entire space, as described here:

https://groups.google.com/d/msg/cesium-dev/Ip0t1u4Sp4k/0jnxSXLOgG0J

hi thanks for your answer here is a photo :

Hi Oumar, I have produced different tests and the rendering still is the same.
I’ve generated tile set with gdal or geographic imager, i’m on a epsg:4326 projection and the result is the same as the photo I’ve sent.

Any idea ?

Hey Erreur,

I was just going to suggest that, by default, Cesium will reproject the imagery which will cause that stretching, but it’s strange that this is still happening even after supplying imagery in epsg:4326.

Is this the utility you used? https://www.gdal.org/gdalwarp.html

Did you make sure to set the target SRS as well as the source SRS?

I think this stretching is expected of anything using the Web Mercator tiling scheme, which goes to infinity at the poles. So you can see this happens even with the default Cesium ion imagery.

However, the Natural Earth imagery that ships with Cesium is in Geographic, so the poles look normal, which you can see in this example:

You could also try explicitly setting the tiling scheme to GeographicTilingScheme when creating your imagery provider in Cesium, see:

https://cesiumjs.org/Cesium/Build/Documentation/createTileMapServiceImageryProvider.html

Let me know if any of that helps. I’m curious to learn what the cause of this stretching is as well.

I and thanks for our answer, yes I thing webmercator projector cause this issue.
Have you got any simple exemple in order to achieve a GeographicTilingScheme. I’ve already try before without success cause I don’t understand the way to achieve this.

THX for all

In first thanks for your support.

I decide to start back from scratch.

I’ve try my program with the natural earth data provided with cesium

and I use this code :

var myown = Cesium.createTileMapServiceImageryProvider({

url : ‘[http://localhost/NaturalEarthII/’, //‘scripts/cloudXLb/](http://localhost/NaturalEarthII/’, //‘scripts/cloudXLb/)’

fileExtension: ‘jpg’,

maximumLevel: 2,

});

at this point everything is fine and the pole are perfect (cf image)

after I take my 30000x15000px image (.tif) with this tfw :

0.00600

0.00000

0.00000

-0.00600

180.00000

90.00000

and I generate my tiles with gdal like this :

gdal2tiles.py --profile=geodetic -z 0-2 mypicture.tif myfolder

when I point my program to this folder I’ve got now this :

when I read the xml provide with the tile folder for both i have :

this for natural earth :

<?xml version="1.0" encoding="utf-8"?> NE2_HR_LC_SR_W_DR_recolored.tif

EPSG:4326

and this for my image :

<?xml version="1.0" encoding="utf-8"?>
<TileMap version="1.0.0" tilemapservice="[http://tms.osgeo.org/1.0.0](http://tms.osgeo.org/1.0.0)">

  <Title>cloudXLb3.tif</Title>

  <Abstract></Abstract>

  <SRS>EPSG:4326</SRS>

  <BoundingBox minx="-180.00000000000000" miny="-90.00000000000000" maxx="179.99999999999994" maxy="88.00000000000000"/>

  <Origin x="-180.00000000000000" y="-90.00000000000000"/>

  <TileFormat width="256" height="256" mime-type="image/png" extension="png"/>

  <TileSets profile="geodetic">

    <TileSet href="0" units-per-pixel="0.70312500000000" order="0"/>

    <TileSet href="1" units-per-pixel="0.35156250000000" order="1"/>

    <TileSet href="2" units-per-pixel="0.17578125000000" order="2"/>

  </TileSets>

</TileMap>

As you see it’s really close.

how the result could be so different ?

what I’ve forgotten or made bad ?

Thanks for all.

Guillaume.

I think the issue might be that your TIF file doesn’t cover the poles. Notice that the maxx and maxy in your XML output are 179.9 and 88 as opposed to 180 and 90. Can you try running gdalinfo (https://www.gdal.org/gdalinfo.html) ? It should output the corner coordinates, which should verify whether or not your source imagery covers the poles.

If you know what your imagery’s limits are, you can define a cartographicLimit rectangle to prevent it from trying to stretch it over the whole globe:

Thanks a lot for all those infos I’m going to trying ll that