Elevation Correction for WGS84 - 4326 GeoJSON Displaying at Correct Height

636
6
06-21-2022 08:25 AM
developerarce
New Contributor III

GeoJSON data being displayed on the Map with a renderer for a 3D Line Symbol as a Path.

I am assuming the elevation of the Map is using `absolute-height`, but my 4326 data is showing up still too far below the earth. From my understanding, the height I have is from the ellipsoid of the 4326 datum. So, why is it not getting displayed correctly on the ArcGIS Map?

 

 

const map = new ArcGISMap({
    basemap: 'hybrid',
    ground: 'world-elevation',
});

const view = new SceneView();
view.spatialReference = SpatialReference.WGS84;

const renderer = new SimpleRenderer({
    symbol: new LineSymbol3D({
      symbolLayers: [
        new PathSymbol3DLayer({
          profile: 'circle',
          width: 0.508,
          material: { color: [255, 75, 75] },
        }),
      ],
    }),
});

const geoJSONLayer = new GeoJSONLayer();
const url = "..."
geoJSONLayer.url = url;
geoJSONLayer.outFields = ['*'];
geoJSONLayer.renderer = renderer;
map.add(geoJSONLayer);

 

 

 

0 Kudos
6 Replies
GreteSoosalu
Esri Contributor

Hi @developerarce 
I tried to reproduce your problem with a simple geojson file and I couldn't reproduce the issue - the path symbol is rendered as expected. Here's my test app: https://codepen.io/gsoosalu/pen/NWyZjMg?editors=1010 .

Could you maybe share a codepen with your app?

Some steps I would check next: 

  • setting the elevationInfo.mode explicitly to absolute-height
  • recheck the z-values in geojson
  • check the units of the z-values. By default the API expects them to be in meters, but this can be adjusted with elevationInfo.unit 
0 Kudos
developerarce
New Contributor III

Hi @GreteSoosalu 
Thank you for your patience. Code pen below.

You will need to zoom out a little to see the 3D object underground.
Coordinates were recorded below the surface, but no more than a few meters below. However, the 2 points that make the path at each end appear to be pretty far below the surface and I am not sure why. Coordinates were taken and exported in 4326 wkid (No Geoid) as meters for elevation.
https://codepen.io/allidoisace/pen/GRQVoee

I ensured absolute height is used as you will see as well as meters.

0 Kudos
developerarce
New Contributor III

Hi @GreteSoosalu 

I will find some spare time in the next day to try this out and share a codepen. Thank you for responding and your patience.

0 Kudos
GreteSoosalu
Esri Contributor

Thanks for the codepen!

The ground elevation value at the area of the feature is about 340m (same when checking the location with https://apps.nationalmap.gov/viewer/ elevation tool) i.e. 30m above your feature. 

Do you know approx. how many feet/meters below the ground the feature should be?

0 Kudos
developerarce
New Contributor III

Yes, the feature should be about 2ft below the surface.

0 Kudos
GreteSoosalu
Esri Contributor

Looks like the elevation difference we see is because the data and the elevation model are in different vertical datums. 

For the US, Esri provides a 3D elevation service based on USGS data, which is using a vertical datum of NAVD 88. This means the elevation values are orthometric (i.e. based on mean sea level).

As you’ve mentioned, your data uses 4326 ellipsoid datum, so you would need to convert the coordinates accordingly (usually GPS units should be able to do that). 

Hope this helps! 

 

PS: here are some related resources: 

0 Kudos