# Clipping Issue with Ion Asset terrain provider

**URL:** <https://community.cesium.com/t/clipping-issue-with-ion-asset-terrain-provider/30445>\
**Category:** CesiumJS\
**Created:** [March 11, 2024, 11:34am UTC](https://community.cesium.com/t/clipping-issue-with-ion-asset-terrain-provider/30445 "2024-03-11T11:34:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexandreBorowczyk](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/alexandreborowczyk/32/4142_2.png) [@AlexandreBorowczyk](https://community.cesium.com/u/AlexandreBorowczyk)\
**Post date:** [March 11, 2024, 11:34am UTC](https://community.cesium.com/t/clipping-issue-with-ion-asset-terrain-provider/30445/1 "2024-03-11T11:34:18Z")

</div>

Hi,

I’m not sure if clipping is the right concept but the issue I’m having is that the terrain seems no to clip properly against the polygons I put on top of it. Here is the sandcastle I’ve create to generate the following pictures: [link](https://sandcastle.cesium.com/#c=jVRtT9swEP4rp34qUnBfRqHtCtpUpA0JBBJoH0b5YJIjteb4KttpV1D++85NQ9+ChhTJ9t3z3FvubmK8XcLbxADEZJyHucIFWjgHgwsYo1N5Jn6tZM1JI169x2S8VAbtpBGVVACP1rLsztJcJWiHpRRALqTylZ3yeNiFihdL2RWZ786hv0qa3ZNBb9DvH0XBRHH0NRyb8OLXTHNwj6X9t8qNSoYwaSQU5xkaz3FVCiMzDKrx75tr+IGUobcK3RDuSC9TMlvQOVqnyAR0R7TfFUVU64usNCkeWqkc3q70MCsBsFB+CjO0xzNyyrMbmKJKp96BNAlQ7jUXdMvMmjfcuA2ykup2pFwZaT2lVs6mKr7E1GLI73EbAXDc6Z2JfifalXY74qS7J+u121ENd9A+5H45+xz3tH/I7Q4+xz3r1vg9/Q/3aetVbN0zyX2qpN4roCOtkjFpsnuK0HV1UgCbPksucrfXi6DD3qG9Op/2Ait23sUHYeFfb/MEk5+rlhjupcNdc7f+8xXgRWqHW5B1/wyB7dTI61JbJ1BGzh9nUl+16laE44nHcTOMifTynnIbIw9zphzyZFajznN6+a4WmmTSDLNbznO5ZMSG74RMkuaBvR30K1H2QB+BJqbgQfDxFJq8X8gebZYa6RBAupYzughJNKLGyPmlxouA+6ayGVkPudVNIVoes5nmZnGt5zz+g17EzgXmqFVRRoma8yo4r1mKEGvpHGtecq3v1SvP9cWoxfgdWiiJMuktrx0tlwwJYYymnYvrUiGEGLX4GZzucz2RfpZ2y+4/).

 ![image](https://global.discourse-cdn.com/cesium/original/3X/8/2/820e1c55a314f21c498836ed652b25cbac441fe0.jpeg)  
 ![image](https://global.discourse-cdn.com/cesium/original/3X/1/4/14bb485ab6337b03e2e55108830a49ff8c32a889.jpeg)

and if I replace the terrainProvider by Cesium.Terrain.fromWorldTerrain I obtain the expected behavior:

 ![image](https://global.discourse-cdn.com/cesium/original/3X/a/1/a1920f4b79ff83de236a9341c70566e71444d14e.jpeg)

To create the Ion asset, I’ve uploaded a DEM TIF of the island

---

<div class="post-metadata">

**Author:** ![AlexandreBorowczyk](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/alexandreborowczyk/32/4142_2.png) [@AlexandreBorowczyk](https://community.cesium.com/u/AlexandreBorowczyk)\
**Post date:** [March 11, 2024, 10:53pm UTC](https://community.cesium.com/t/clipping-issue-with-ion-asset-terrain-provider/30445/2 "2024-03-11T22:53:33Z")

</div>

Finaly, I’ve figured out the solution

```auto
    const viewer = new Cesium.Viewer("cesiumContainer", {
    terrainProvider: new Cesium.Terrain( Cesium.CesiumTerrainProvider.fromIonAssetId(2495988)),
  });

```

rather then

```auto
    const viewer = new Cesium.Viewer("cesiumContainer", {
    terrainProvider: await Cesium.CesiumTerrainProvider.fromIonAssetId(2495988),
  });

```

I would be interested to better understand the difference between terrain and terrain provider?
