Showing Gap Between BaseMap and 3D Object in WPF

262
3
Jump to solution
10-22-2021 05:55 AM
KarthikS
New Contributor II

Hi,

I am new one for ArcGIS.

I tried  to load the local .slpk file. Its loaded successfully.

But 3D Object not rendered perfectly in base map.

Some gap is showing between base map and 3D object. like Below

GAP.png

 

 My Code is below

============== 

2.png

Please give us advice

Thanks 

0 Kudos
1 Solution

Accepted Solutions
MichaelBranscomb
Esri Frequent Contributor

It looks like you need to add an elevation source to the scene view base surface. See this sample for an example of how to do that in code: https://developers.arcgis.com/net/wpf/sample-code/get-elevation-at-a-point/

The important lines are:

 

Uri elevationUri = new Uri("https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer");
Surface baseSurface = new Surface();
baseSurface.ElevationSources.Add(new ArcGISTiledElevationSource(elevationUri));
myScene.BaseSurface = baseSurface;

 

 

Alternatively try experimenting with the SurfacePlacement property of you "slpkLayer". For more info see https://developers.arcgis.com/net/api-reference/api/netwin/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Map...

 

View solution in original post

3 Replies
MichaelBranscomb
Esri Frequent Contributor

It looks like you need to add an elevation source to the scene view base surface. See this sample for an example of how to do that in code: https://developers.arcgis.com/net/wpf/sample-code/get-elevation-at-a-point/

The important lines are:

 

Uri elevationUri = new Uri("https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer");
Surface baseSurface = new Surface();
baseSurface.ElevationSources.Add(new ArcGISTiledElevationSource(elevationUri));
myScene.BaseSurface = baseSurface;

 

 

Alternatively try experimenting with the SurfacePlacement property of you "slpkLayer". For more info see https://developers.arcgis.com/net/api-reference/api/netwin/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Map...

 

View solution in original post

KarthikS
New Contributor II

Thanks you  MichaelBranscomb

When i set the elevation source gap issue is resolved. 

But vegetations and highways is not showing after setting the elevation source.

see the following figure

Before set the elevation sourceBefore set the elevation sourceAfter set the elevation sourceAfter set the elevation source

Please give us advice

Thanks

0 Kudos
MichaelBranscomb
Esri Frequent Contributor
0 Kudos