GithubHelp home page GithubHelp logo

mohamed-elsabagh / opentopodata Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ajnisbet/opentopodata

0.0 0.0 0.0 38.97 MB

Open alternative to the Google Elevation API!

Home Page: https://www.opentopodata.org

License: MIT License

Shell 0.09% Python 95.58% Makefile 1.57% Dockerfile 2.76%

opentopodata's Introduction

Open Topo Data

Documentation: www.opentopodata.org

Open Topo Data is a REST API server for your elevation data.

curl http://localhost:5000/v1/test-dataset?locations=56,123
{
    "results": [{
        "elevation": 815.0,
        "location": {
            "lat": 56.0,
            "lng": 123.0
        },
        "dataset": "test-dataset"
    }],
    "status": "OK"
}

You can self-host with your own dataset or use the free public API which is configured with a number of open elevation datasets. The API is largely compatible with the Google Maps Elevation API.

Installation

Install docker and git then run:

git clone https://github.com/ajnisbet/opentopodata.git
cd opentopodata
make build
make run

This will start an Open Topo Data server on http://localhost:5000/. Some extra steps might be needed for Windows, M1/Apple Silicon, and Kubernetes.

Open Topo Data supports a wide range of raster file formats and tiling schemes, including most of those used by popular open elevation datasets. See the server docs for more about configuration and adding datasets.

Usage

Open Topo Data has a single endpoint: a point query endpoint that returns the elevation at a single point or a series of points.

curl http://localhost:5000/v1/test-dataset?locations=56,123
{
    "results": [{
        "elevation": 815.0,
        "location": {
            "lat": 56.0,
            "lng": 123.0
        },
        "dataset": "test-dataset"
    }],
    "status": "OK"
}

The interpolation algorithm used can be configured as a request parameter, multiple locations can be given in a single request, and locations can also be provided in Google Polyline format.

See the API docs for more about request and response formats.

Public API

I'm hosting a free public API at api.opentopodata.org.

curl https://api.opentopodata.org/v1/srtm30m?locations=57.688709,11.976404
{
  "results": [
    {
      "elevation": 55.0,
      "location": {
        "lat": 57.688709,
        "lng": 11.976404
      },
      "dataset": "srtm30m"
    }
  ],
  "status": "OK"
}

The following datasets are available on the public API:

License

MIT

Support

Need help getting Open Topo Data running? Send me an email at [email protected] or open an issue!

Paid hosting

If you'd like me to host and manage an elevation API for your business, email me at [email protected] or check out my sister project GPXZ.

opentopodata's People

Contributors

ajnisbet avatar janusw avatar kant avatar hugoheneault avatar khintz avatar khendrickx avatar ntdt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.