GithubHelp home page GithubHelp logo

milesgranger / elevation-api-public Goto Github PK

View Code? Open in Web Editor NEW
8.0 8.0 0.0 4.44 MB

Free Elevation API

Home Page: https://elevation-api.io

elevation elevation-api elevation-data altitude-api altitude

elevation-api-public's Introduction

Elevation-API


We have been serving very heavy loads without any donations to keep the service free. Therefore, the site has moved to a 'freemium' model while maintaining a very low cost for even higher resolution (30 meters) and will continue to offer free elevations for 1km resolution.

Public interface for https://elevation-api.io, relating to any issues found or comments for new features.

elevation-api-public's People

Contributors

milesgranger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

elevation-api-public's Issues

Add frontend interface using the API

Currently closing in on ~500k req / day, and not a single donation to support the service. ๐Ÿ‘Ž

Perhaps implementing some frontend interface map for people to use can get some traffic and thereby place an ad or two in an effort to cover some of the hosting costs.

@hwagit Would you be interested in this?

Report -9999 if elevation not found

New SRTM90 dataset does not list a lot of the ocean points, these points, or any points NOT found, should be given a standard -9999 value.

Add a premium service

Turns out people are unwilling to make any donations, this is not sustainable, and thus proposing adding a premium service:

Implementation:

  • No user management: Either enter an existing key to update the balance, or generate a key before checkout.
  • Keys over a given age in days and no balance are deleted.

Once things are in place, keep giving the 90m resolution for a couple weeks while letting those most active on the API know about the upcomming change.

Cross-Origin Request Blocked

Would it be possible to make the elevation API accessible via javascript? Currently I get a Cross-Origin error:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://elevation-api.io/api/elevation?points=...

I think this could easily be fixed by adding a .htaccess containing:

Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Headers "Content-Type"
Header set Access-Control-Allow-Methods "GET"

Thanks :)

Limit number of open NetCDF files

possible to order the coordinates and then start finding elevations, having a max of perhaps 5 open at a time, closing the last accessed one?

Locations count in an API request

Hello!

I am integrating the elevations API into a routing application and am having some problems with the number of waypoints I can include in an API request.

For example, the following call contains six locations, under the ten that I believe the request supports,

https://elevation-api.io/api/elevation?points=(51.9385704,-2.4214404)(51.93377470000001,-2.407834)(51.87476770000001,-2.2669835)(51.8760084,-2.2408741)(51.8882505,-2.1862001)(51.89352890000001,-2.1498523)&key=foo

...though I am being informed that the request contains more than ten locations in the API response,

{
  "message": "Requested more than 10 locations, please reduce the request size."
}

If I reduce it by one location to five locations, then I get a valid response - could it be that the # of lat/long values and not the number of lat/long locations are being counted? Very possible I am reading the constraint incorrectly!

Thanks in advance!

Update landing page

Processing about ~30k requests per day...do better job of encouraging to donate

Potentially valuable service but pricing...

My use case is fairly common where I need to correct paths of elevation containing between 100 - 5,000 GPS points. Google is currently both the most expensive and best quality elevation provider. Their API allows elevation to be requested in batches of up to 500 points (limited by GET request URL length limits). So on a price per GPS point basis your service is actually double the price of Google's API.

For example. Google charges $0.005/request. So it takes me 200 requests and costs $1 to get elevations for 100 paths with 1,000 gps points per path. To use your API to achieve the same thing I would need to make 10,000 requests (10 points at a time instead of 500 with Google) and it would cost $2. Google is also, well, Google, so there's guaranteed uptime, and a high quality elevation map that's been stitched together using thousands of local sources.

Perhaps you would consider allowing more GPS points to be calculated per request (ideally via a POST request)? If you could manage 1,000 points/request and charge 10X more per request than you do now, then your service would then cost 20% of the price of Google's elevation API, and that could potentially make it a lot more appealing to more customers.

Could not compile `ring`

I get the following error when trying to "make" the project:

error[E0658]: non-reference pattern used to match a reference (see issue #42640)
   --> /home/blep8223/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/build.rs:375:9
    |
375 |     let (_, _, perlasm_format) = ASM_TARGETS.iter().find(|entry| {
    |         ^^^^^^^^^^^^^^^^^^^^^^ help: consider using a reference: `&(_, _, perlasm_format)`

error[E0658]: non-reference pattern used to match a reference (see issue #42640)
   --> /home/blep8223/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/build.rs:674:9
    |
674 |     for (src, dst) in src_dst {
    |         ^^^^^^^^^^ help: consider using a reference: `&(src, dst)`

error[E0658]: non-reference pattern used to match a reference (see issue #42640)
   --> /home/blep8223/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/build.rs:737:35
    |
737 |             RING_SRCS.iter().any(|(_, f)| cmp(f)) ||
    |                                   ^^^^^^ help: consider using a reference: `&(_, f)`

error[E0658]: non-reference pattern used to match a reference (see issue #42640)
   --> /home/blep8223/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/build.rs:741:35
    |
741 |             RING_SRCS.iter().any(|(_, f)| cmp(f)) ||
    |                                   ^^^^^^ help: consider using a reference: `&(_, f)`

error: aborting due to 4 previous errors

error: Could not compile `ring`.

Any idea?

Thanks.

Origin is not allowed to make this request

Following on #29, now the request is accepted but I get the following response instead of the json (error code 400):

Origin is not allowed to make this request

Here is my script:

      var url = "https://elevation-api.io/api/elevation?points=(-33.9146948,151.2511528)";
      $.ajax({
         type: "GET",
         url: url,
         success: function(json) {
            console.log(json);
         },
         error:function(e, f) {
            console.log(e);
            console.log(f);
         },
     });

Which sends the following http headers; I've tried with a different host (different origin) and got the same answer:

Host: elevation-api.io
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Referer: http://localhost/
Origin: http://localhost
Connection: keep-alive

Thanks!

Elevation not returned on new account with $1 balance

If I request

https://elevation-api.io/api/elevation?points=(46.2219,13.5022),(46.2181,13.4987)&key=<my API key>&resolution=5

then the result is elevation at 5000m resolution. The account is new and has $1 balance on it.

If there's a minimum balance required for queries, it would be good to document this. If a key-authenticated API call fails, it would be good if the JSON response included the reason for failure, rather than just opaquely returning a 5000m response.

Update docs

Provide code examples for both POST and GET requests.

Create summary file when one doesn't exist in the data dir - automatically

Now there is two separate commands, run-server and make-summary, it should really be only run-server and then create the summary file if one is not found before starting server.

Also, don't read summary file with each request, should instead have it loaded globally.

  • Auto create summary if not found in data dir

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.