Skip to content

Instantly share code, notes, and snippets.

@fogonwater
Last active Sep 15, 2016
Embed
What would you like to do?
Notes on handling elevation with Geojson

There are a couple of approaches to encoding elevation in geojson.

  1. The value for a feature's coordinates key should an array of numbers, which are ordered easting, northing and (optionally) altitude. The array represents a position.
  2. Alternatively, you can make the elevation value one of the feature's properties.

Both approaches are demonstrated below.

{
  "type": "Feature",
  "properties": {
    "name": "Mount Ruapehu",
    "elevation_m": 2797
  },
  "geometry": {
    "type": "Point",
    "coordinates": [
      175.55890560150146,
      -39.28834275351452,
      2797
    ]
  }
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment