Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 6 of 6

Thread: Reading DTM (digital terrain managment) files

  1. #1
    Junior Member
    Join Date
    Nov 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Reading DTM (digital terrain managment) files

    Hi guys.

    I understand that in Java Eclipse that to read files, the files have to be within the folder of the java program so I have put the files into the folder of the java program where all the files to do with the DTM file reader is.

    Thing is I haven't I clue what code to type up to be able to read the DTM files. I know about needing the required tools to such as a file reader, or buffered reader etc but I haven't a clue either if these are the correct tools.

    Could someone point me in the right direction.

    The program should be able to print out the highest peak and lowest peak data ranges from the DTM files and also be able to print out this information from the DTM files to the console window within java eclipse.


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,067
    Thanks
    47
    Thanked 2,146 Times in 2,119 Posts

    Default Re: Reading DTM (digital terrain managment) files

    A standalone java program (without an IDE) can read a file anywhere on your PC.

    What is the internal format of a DTM file? Does it have records? What data is in a record? Given that information, you should be able to write a program to read a DTM file and extract any data you are interested in.

    Have you asked google if there is a package to read a DTM file?
    If not, you may have to write your own.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Nov 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Reading DTM (digital terrain managment) files

    Thanks for your reply.

    The assignment is asking me to write up the program from scratch to show I can do it and also document what each stage does. Documenting the stages of the code isn't a problem as it's a case of making it up.

    I can't use packages I don't think to read DTM files as I said before it has to be written from scratch.

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,067
    Thanks
    47
    Thanked 2,146 Times in 2,119 Posts

    Default Re: Reading DTM (digital terrain managment) files

    If you know what the layout of the contents of the file is, there shouldn't be a problem writing a program to read the file and extract data.
    If you don't understand my answer, don't ignore it, ask a question.

  5. #5
    Junior Member
    Join Date
    Nov 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Reading DTM (digital terrain managment) files

    Quote Originally Posted by Norm View Post
    If you know what the layout of the contents of the file is, there shouldn't be a problem writing a program to read the file and extract data.
    Apparently it's all numbers but I haven't a clue what the layout is or anything as I've never touched on java programming ever...

  6. #6
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,067
    Thanks
    47
    Thanked 2,146 Times in 2,119 Posts

    Default Re: Reading DTM (digital terrain managment) files

    I haven't a clue what the layout is
    The first thing you must do is get the layout of the file. Without that you will not be able to get any information from it.
    I've never touched on java programming
    You would need to know what is in the file to use any programming language to get data from the file.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Reading files and writing files
    By ProgrammerNewbie in forum What's Wrong With My Code?
    Replies: 5
    Last Post: December 2nd, 2012, 11:13 PM
  2. reading .txt files
    By deependeroracle in forum File I/O & Other I/O Streams
    Replies: 5
    Last Post: February 8th, 2012, 11:47 AM
  3. Reading In Then Writing Out Massive Files
    By aussiemcgr in forum Java Theory & Questions
    Replies: 3
    Last Post: July 28th, 2011, 07:00 PM
  4. Reading and Writing Text Files
    By kappasig84 in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: March 1st, 2010, 06:16 PM
  5. Reading many files using a scanner
    By jayjames90 in forum File I/O & Other I/O Streams
    Replies: 2
    Last Post: October 22nd, 2009, 04:35 PM