How do you read the NASA.hgt file in C #?

Does anyone know how to read the NASA.hgt file in C #?

Obviously, the question was asked in Python: how to read NASA.hgt binary files

+4
source share
1 answer

Use the GDAL library (geographic data abstraction layer): it supports HGT files and has C # binding using SWIG.

Edit: all the information you need is here .

From the FAQ :

SRTM data files have names like "N34W119.hgt". What do letters and numbers refer to, and what is the .hgt format?

Each data file covers one degree of latitude block with one degree of longitude of the earth's surface. The first seven characters indicate the southwest corner of the block, with N, S, E, and W - north, south, east, and west. Thus, File N34W119.hgt covers latitudes from 34 to 35 North and longitude 118-119 West (this file includes the center of Los Angeles, California). The .hgt file name extension simply means the word "height", which means elevation. This is NOT a format. These files are in the "raw" format (without headers and not compressed), 16-bit signed integers, the height measured in meters above sea level, in the "geographic" (array of latitude and longitude), with the indicated data voids from - 32768. International 3-arc files have 1201 columns and 1201 rows of data, with a total file size of 2,884,280 bytes (= 1201 x 1201 x 2). The United States 1-arch-second files have 3601 columns and 3601 rows of data with a total file size of 25,934,402 bytes (= 3601 x 3601 x 2). For more information, read the text file "SRTM_Topo.txt" at http://edcftp.cr.usgs.gov/pub/data/srtm/Readme.html

+2
source

Source: https://habr.com/ru/post/1442143/


All Articles