ajnisbet / opentopodata

Open alternative to the Google Elevation API!
https://www.opentopodata.org
MIT License
312 stars 69 forks source link

Using Geoid (EGM2008) as dataset #94

Closed arkonsolutions closed 5 months ago

arkonsolutions commented 6 months ago

Hello!

Please tell me how to approach this task and where to start.

Right here (https://geographiclib.sourceforge.io/C++/doc/geoid.html ) there are links to world-wide geoid files, they can be downloaded and converted to tif.

arnesetzer commented 5 months ago

Well, convert them into a geotiff or srtm syntax and create a entry in the config.yaml. I just had a quick look, but it seems like, that gdal can handle .pgm files so that shouldnt be a problem.

arkonsolutions commented 5 months ago

Yes, I have succeeded in this case.

My steps (Windows 10 + wsl):


* Assemby and run opentopodata

cmd (not wsl):

cd opentopodata docker build --tag opentopodata --file docker/Dockerfile .

docker run --rm -it --volume "C:/Volumes/:/app/data:ro" -p 5000:5000 -e N_UWSGI_THREADS=8 opentopodata sh -c "/usr/bin/supervisord -c /app/docker/supervisord.conf"


Results:

take a location:
10.168455, 49.402717

Online GeoidEval calculator
https://geographiclib.sourceforge.io/cgi-bin/GeoidEval?input=10.168455+49.402717&option=Submit
returns: -29.4900

GET http://localhost:5000/v1/egm2008-5?locations=10.168455, 49.402717

{ "results": [ { "dataset": "egm2008-5", "elevation": -29.48802375793457, "location": { "lat": 10.168455, "lng": 49.402717 } } ], "status": "OK" }```

ajnisbet commented 5 months ago

Oh cool, thanks for reporting back with instructions!!!