Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6818845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:13:41+00:00 2026-05-26T21:13:41+00:00

I have file with binary data. This is specification: The SRTM data files have

  • 0

I have file with binary data. This is specification:

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

Each data file covers a one-degree-of-latitude by one-degree-of-longitude block of Earth’s surface. The first seven
characters indicate the southwest corner of the block, with N, S, E,
and W referring to north, south, east, and west. Thus, the
“N34W119.hgt” file covers latitudes 34 to 35 North and longitudes
118-119 West (this file includes downtown Los Angeles, California).
The filename extension “.hgt” simply stands for the word “height”,
meaning elevation. It is NOT a format type. These files are in “raw”
format (no headers and not compressed), 16-bit signed integers,
elevation measured in meters above sea level, in a “geographic”
(latitude and longitude array) projection, with data voids indicated
by -32768. International 3-arc-second files have 1201 columns and 1201
rows of data, with a total filesize of 2,884,802 bytes ( = 1201 x 1201
x 2). United States 1-arc-second files have 3601 columns and 3601 rows
of data, with a total filesize 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

Anyone can help me how I can read this file in java? It is possible to read this file to array, because I need to do some operations on elements from this file?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T21:13:42+00:00Added an answer on May 26, 2026 at 9:13 pm

    I would read the entire file into a ShortBuffer (so you choose the endianess)

    FileChannel fc = new FileInputStream(file).getChannel();
    ByteBuffer bb = ByteBuffer.allocateDirect((int) fc.size());
    while (bb.remaining() > 0) fc.read(bb);
    fc.close();
    bb.flip();
    // choose the right endianness
    ShortBuffer sb = bb.order(ByteOrder.LITTLE_ENDIAN).asShortBuffer();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a flv video file. I loaded the binary data of this flv
We have large files with zlib-compressed binary data that we would like to memory
I have a binary file specification that describes a packetized data structure. Each data
Currently, I have been reading lists of data from a binary data file programmatically
I have binary data in a file that I can read into a byte
I have a file with binary data and I need to replace a few
I need to extract financial price data from a binary file. This price data
I have to extract some data from a binary file. the data begin with
I have one binary file which I have created. In it, data is stored
I have a problem with binary type. I have binary file with data. Every

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.