ESRI API 4.4 Local Scene With Elevation?

1011
5
Jump to solution
08-08-2017 09:19 AM
RichardReinicke
Occasional Contributor II

Hey everybody,

I was asking myself if it`s already possible to create a local 3d scene in lets say srid 31463 with a custom ElevationLayer.

I have a topographical TileService:
RIPS_TK_Cache (MapServer) 

and an ElevationService

http://ripsraster.lubw.bwl.de/arcgis/rest/services/Imageservices/DGM005/ImageServer 

Does anybody know how to do that?

Thank you for any help!

0 Kudos
1 Solution

Accepted Solutions
RichardReinicke
Occasional Contributor II

I was now able to solve this issue. The problem was not an unmatch of the spatial reference systems between elevation and topographic service. They were both in 31436 from the beginning but we were missing a tile cache on the elevation service. We now calculated the cache with the same tiling scheme as the topographic base layer and it works now!

Also important, it was not enougth to just do:

const elevLayer = new ElevationLayer({
    url: 'http://ripsraster.lubw.bwl.de/arcgis/rest/services/Imageservices/DGM025_cache_3D/ImageServer'
});

var map = new Map({
    basemap: basemap,
    ground: [ elevLayer ]
});

I also had to execute 
map.ground.layers.add(elevLayer);

View solution in original post

5 Replies
ThomasSolow
Occasional Contributor III

I think this is possible but I'm not sure.

I think the spatial reference of the elevation layer needs to match the spatial reference of the view, which will be the same as the spatial reference of your basemap (31463). I can't access the elevation layer you linked

Here's a sample that adds your basemap in a local scene: JS Bin - Collaborative JavaScript Debugging and sets the ground to be "world-elevation."  This doesn't work because the SRs don't match.

You can try creating a new elevation layer using the url you provided and passing the resulting layer into the ground property on the map, ie:

const elevLayer = new ElevationLayer({
  url: ‍‍'http://ripsraster.lubw.bwl.de/arcgis/rest/services/Imageservices/DGM005/ImageServer'
});

const map = new Map({
  ...,
  ground: [elevLayer]
});
RichardReinicke
Occasional Contributor II

Hello Thomas,

if I`m doing it that way I don`t get any errors but also no terrain. If I check the network traffic in chrome dev tools then the elevation service isn`t called at all. I believe it`s maybe because our Elevation Service isn`t cached so we will first try to cache it with the same tiling sheme as the other map service.

Is there any special documentation of how to publish a cached elevation service in a projected coordinate system and not global?

I just want to understand, the local scenes are there to show local projected 3d map views in other coordinate system then web mercator. I can`t add  

ground: "world-elevation"

as default there because it will never support the local coordinate system, so I need a custom ground base layer in my appropriate system. 

0 Kudos
ThomasSolow
Occasional Contributor III
Is there any special documentation of how to publish a cached elevation service in a projected coordinate system and not global?

You might check out this: Publish an elevation image service—Documentation (10.3 and 10.3.1) | ArcGIS for Server 

Doesn't go into a lot of detail unfortunately.

I can`t add  

 

ground: "world-elevation"

as default there because it will never support the local coordinate system, so I need a custom ground base layer in my appropriate system.

That's what the error that gets thrown when you try to add 'world-elevation' suggests to me.  You can create a local scene and add 'world-elevation' as the ground and it will work fine: JS Bin - Collaborative JavaScript Debugging as long as the SRs match.

I can't guarantee hosting an elevation service in the same SpatialReference as your local scene will solve the problem, but it seems like it should.

RichardReinicke
Occasional Contributor II

I was now able to solve this issue. The problem was not an unmatch of the spatial reference systems between elevation and topographic service. They were both in 31436 from the beginning but we were missing a tile cache on the elevation service. We now calculated the cache with the same tiling scheme as the topographic base layer and it works now!

Also important, it was not enougth to just do:

const elevLayer = new ElevationLayer({
    url: 'http://ripsraster.lubw.bwl.de/arcgis/rest/services/Imageservices/DGM025_cache_3D/ImageServer'
});

var map = new Map({
    basemap: basemap,
    ground: [ elevLayer ]
});

I also had to execute 
map.ground.layers.add(elevLayer);

ThomasSolow
Occasional Contributor III

Awesome.  Good to know elevation layers are supported as long as the spatial references match and the service is cached.