I need to find out the elevation levels for a certain region (center is located at 132.159633, 43.350116).

For this purpose I went to the Elevation finder and downloaded there the relevant part of GTOPO30 data set.

Now I have two files with elevation data:

  1. gt30e100n90.tif
  2. Contents of the gt30e100n90_dem.zip archive, incl. gt30e100n90.dem.

How can I extract the elevation values (input: lon/lat coordinate, output: elevation at this location according to those data) in Java?

Note that I will only retrieve elevation data for buildings, hence I don't need to take into account that a particular coordinate may correspond to water.

I saw this project, there seems to be no source code there.


1 Answer 1


I would suggest looking at the GDAL/OGR libraries and their Java bindings. The javadocs are here, gdal.org . They're in the in the Maven repo as well. (Not tried the Java bindings, only the python ones, but they look identical).

The following question gives an example of what you're trying to do (it's in python, but the java bindings should be the same).

Getting pixel value of GDAL raster under OGR point without NumPy?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.