Skip to main content
replaced http://gis.stackexchange.com/ with https://gis.stackexchange.com/
Source Link

From the comment discussion:

There are a range of issues discussed in previous questions:

It is particularly important to note that HGT file format is a pretty raw format, essentially just 16 bit integer values. However reading those values as 16 bit integer values on many machines will treat them as little endian format, while the actual format is big endian.

One option would be to read them as pairs of bytes, and bit shift / add.

From the comment discussion:

There are a range of issues discussed in previous questions:

It is particularly important to note that HGT file format is a pretty raw format, essentially just 16 bit integer values. However reading those values as 16 bit integer values on many machines will treat them as little endian format, while the actual format is big endian.

One option would be to read them as pairs of bytes, and bit shift / add.

From the comment discussion:

There are a range of issues discussed in previous questions:

It is particularly important to note that HGT file format is a pretty raw format, essentially just 16 bit integer values. However reading those values as 16 bit integer values on many machines will treat them as little endian format, while the actual format is big endian.

One option would be to read them as pairs of bytes, and bit shift / add.

Source Link
BradHards
  • 12.9k
  • 2
  • 39
  • 72

From the comment discussion:

There are a range of issues discussed in previous questions:

It is particularly important to note that HGT file format is a pretty raw format, essentially just 16 bit integer values. However reading those values as 16 bit integer values on many machines will treat them as little endian format, while the actual format is big endian.

One option would be to read them as pairs of bytes, and bit shift / add.

Post Made Community Wiki by BradHards