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?
Solved! Go to Solution.
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.
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
From here you could recreate the attribute fields then append the data from your csv and use this in the scene.
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?
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.
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.
For records and tracking: Parent comment was published by @GianlucaMiele1 on 4/12/2023