Custom Elevation Layer with Exaggeration

990
11
Jump to solution
10-12-2021 05:39 AM
Wade
by
New Contributor II

This example is for all elevations

https://developers.arcgis.com/javascript/latest/sample-code/layers-custom-elevation-exaggerated/

If i want to a range  elevations make changes, Is there a way?

 

0 Kudos
1 Solution

Accepted Solutions
JohnGrayson
Esri Regular Contributor

Creating a custom elevation services specific to your needs is one option.  If you'd like to use the BaseElevationLayer then you have full control of the extent of the layer and the elevation values used.  I updated the codepen to show how you could use a constant elevation, an elevation offset, or an exaggerated elevation value.  https://codepen.io/john-grayson/pen/YzxXKLO

I hope this helps.

View solution in original post

0 Kudos
11 Replies
JohnGrayson
Esri Regular Contributor

Here's a modified version of the example that shows how to control which elevation values get exaggerated:

https://codepen.io/john-grayson/pen/YzxXKLO

 

0 Kudos
Wade
by
New Contributor II

Thank you.

This example is for Elevation data values, Can use Elevation extent?

if((data.values[i] >= onlyExagerateElevationRange.min) && (data.values[i] <= onlyExagerateElevationRange.max)){
      data.values[i] = data.values[i] * exaggeration;
}

0 Kudos
JohnGrayson
Esri Regular Contributor

One possible way to do this is to use a local viewing mode and set the clip area as needed.  I updated the codepen example to show this concept.

0 Kudos
Wade
by
New Contributor II

I build localArea, SceneView can use, and ExaggeratedElevationLayer load fullExtent use clippingArea.

Want to present Depth effect, Seems inappropriate.

const localArea = new Extent({
            spatialReference: { wkid: 3857 },
            xmin: -2.0037507842788246E7,
            ymin: -2.0037508659999996E7,
            xmax: 2.0037507842788246E7,
            ymax: 2.0037508340000004E7
});

this.addResolvingPromise(
              this._elevation.load().then(() => {
                     this.tileInfo = this._elevation.tileInfo;
                     this.spatialReference = this._elevation.spatialReference;
                     this.fullExtent = clippingArea;
               })
);

0 Kudos
JohnGrayson
Esri Regular Contributor

So you want to have two different exaggerations in the same display?  I don't think that using a clippingArea or setting the fullExtent will not work for that use case.  You'd have to modify the elevation values in such a way where you provide a smooth elevation transition at the edges of the overall extent of your area of interest.  Another possibility is to publish a new Elevation Layer that already has the elevation values exaggerated and smoothed at the edges to ensure a good visual transition between your area of interest and the rest of the display.

0 Kudos
Wade
by
New Contributor II

I want to have different exaggerations in the same display,It's like being able to freely choose the area to be changed.

Thank you for your advice, I will try.

0 Kudos
Wade
by
New Contributor II

I want to dig a hole at elevation layer, Can only be created with BaseElevationLayer way ? 

These problems are due to the display of objects underground.

0 Kudos
JohnGrayson
Esri Regular Contributor

Creating a custom elevation services specific to your needs is one option.  If you'd like to use the BaseElevationLayer then you have full control of the extent of the layer and the elevation values used.  I updated the codepen to show how you could use a constant elevation, an elevation offset, or an exaggerated elevation value.  https://codepen.io/john-grayson/pen/YzxXKLO

I hope this helps.

0 Kudos
Wade
by
New Contributor II

Thank you very much for your help.

0 Kudos