Select to view content in your preferred language

Attribute based altitude for point layer in scene viewer?

786
5
Jump to solution
04-11-2023 07:04 AM
Jay_Gregory
Regular Contributor

I've uploaded a CSV with lat/longs and created a hosted feature layer in AGOL.  One of the attributes in the layer is altitude (in feet), but I am unable to symbolize these points in the scene viewer, which seems to only be able to show a constant altitude for all points.  

I know if I created a shapefile with z values, or maybe geojson and reuploaded this might work, but is there any way to enable this with a CSV layer, either with Arcade or a analysis service to add Z values?  Or a way I'm missing to do this in the scene viewer for point features?

0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

Specifying the features' elevation to an attribute in Scene Viewer is not yet possible in the UI. This is on our backlog but not yet planned for a specific release. Could you please share the use case(s) you are trying to solve? This helps us to prioritize our backlog. 

Even if there is no UI in Scene Viewer the underlying Maps SDK for JavaScript supports this. As shown as part of this sample you can specify an Arcade expression within `featureExpressionInfo` and use it for your layers' `elevationInfo`.

elevationInfo: {

mode: "relative-to-ground",

featureExpressionInfo: { expression: "$feature.ATTRIBUTE-WITH-HEIGHTS" },

unit: "meters"

}

Once you have prepared your webscene and saved it using Scene Viewer you can directly adjust the JSON, using the ArcGIS Online Assistant tool, accessible at https://ago-assistant.esri.com/.

As `elevationInfo` for the CSV layer in your webscene you should specify something similar as shown in the code snipped above.

View solution in original post

5 Replies
David_McRitchie
Esri Contributor

I suspect while the layer has altitude information it is not Z-enabled.

The best way I find to resolve this is to create a new layer and ensure this toggle is enabled

Zvalue.png

 

From here you could recreate the attribute fields then append the data from your csv and use this in the scene.

Esri UK -Technical Support Analyst
0 Kudos
Jay_Gregory
Regular Contributor

Thanks for the response - this pattern makes sense but seems a little cumbersome -so there is no way to enable this on creating a feature layer from a CSV (which is useful because it infers your schema), and no way to enable it after a feature service has been created?

0 Kudos
by Anonymous User
Not applicable

Specifying the features' elevation to an attribute in Scene Viewer is not yet possible in the UI. This is on our backlog but not yet planned for a specific release. Could you please share the use case(s) you are trying to solve? This helps us to prioritize our backlog. 

Even if there is no UI in Scene Viewer the underlying Maps SDK for JavaScript supports this. As shown as part of this sample you can specify an Arcade expression within `featureExpressionInfo` and use it for your layers' `elevationInfo`.

elevationInfo: {

mode: "relative-to-ground",

featureExpressionInfo: { expression: "$feature.ATTRIBUTE-WITH-HEIGHTS" },

unit: "meters"

}

Once you have prepared your webscene and saved it using Scene Viewer you can directly adjust the JSON, using the ArcGIS Online Assistant tool, accessible at https://ago-assistant.esri.com/.

As `elevationInfo` for the CSV layer in your webscene you should specify something similar as shown in the code snipped above.

Jay_Gregory
Regular Contributor

Thank you - you might be right the general use cases might be minimal.  Our primary use case is aviation data - a lot of systems export flight data as lat / long / altitude in CSV format, so easily being able to view this in 3D would be useful.  

0 Kudos
JesseCloutier
Esri Community Manager

For records and tracking: Parent comment was published by @GianlucaMiele1 on 4/12/2023

Jesse Cloutier
Community Manager, Engagement & Content
0 Kudos