Giter VIP home page Giter VIP logo

Comments (7)

notveryleet avatar notveryleet commented on August 16, 2024

Would like to see this, I'm looking to use this for astronomical ephemerides from a location, elevation is one of the variables.

Thanks,
-esy

from geocoder.

DenisCarriere avatar DenisCarriere commented on August 16, 2024

Hey Esy,
Thanks for the comment, I am always willing to add new features to this geocoder, also when people comment it motivates me to add them faster.
The elevation Tool should be working now, please test it out to it's full capacity, there will be a 2500 query limit per day based on Google's API, if you needed to get LOTS of elevation point you could be looking into some type of PostGIS + Elevation calculations, but that can get complicated.

Check out the Wiki page for Elevation Tool, I'll paste it here below:

Elevation Tool

Elevation tool will return the Mean elevation above Sea Level in meters based
on Lat & Lng inputs or an address using Google's elevation API.

>>> latlng = (45.4215296, -75.6971931)
>>> g = geocoder.elevation(latlng)
#OR
>>> g = geocoder.elevation("Ottawa, ON")
>>> g.elevation
'71.8073501587'
...

JSON output

By simply calling g.json you can retrieve a JSON object.

{
'elevation': 71.8073501586914,
 'lat': 45.4215296,
 'lng': -75.6971931,
 'location': 'Ottawa, ON',
 'ok': True,
 'provider': 'Elevation Google',
 'quality': None,
 'resolution': 1.192993998527527,
 'status': u'OK',
 'url': u'http://maps.googleapis.com/maps/api/elevation/json?locations=45.4215296%2C-75.6971931'
}

from geocoder.

notveryleet avatar notveryleet commented on August 16, 2024

Awesome.

I think you mean to say "Mean elevation above Sea Level" in the above.

FWIW Iā€™m using it in this little WSGI ditty that has turned out to be pretty useful to our local observatory and members:

http://ec2-54-82-43-159.compute-1.amazonaws.com:5555

-esy

from geocoder.

DenisCarriere avatar DenisCarriere commented on August 16, 2024

Thanks for the correction, You are right on that one.

Yes I tried it out your little WSGI by cloning your git repo, it seems to work really well. Good job on it!

from geocoder.

notveryleet avatar notveryleet commented on August 16, 2024

Now I need to check in this! :-)

from geocoder.

DenisCarriere avatar DenisCarriere commented on August 16, 2024

I've done a few tests with the elevation tool and it seems to work without any issues, but let me know if it breaks.
Cheers,

from geocoder.

notveryleet avatar notveryleet commented on August 16, 2024

Thanks again! New code to support it is checked in.

-esy

from geocoder.

Related Issues (20)

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.