Can we convert to GIF and keep z's values

I have a raster image ( DEM fromat from  US Geological survey).
This format has x,y, z(elevation data). If I want to display it in the Web,
I have to convert it to GIF/JPG formats. In doing so, I will loose the z's values which I need
to use in my calculation in Java or whatever. Is there a way to convert the DEM format to
 GIF but still keep the all the z values. I see on solution is to save he z values in a text
file but in this case java will take too much time to download it and interact with it
once it is loaded. I am looking for a solution. I am prepared to do whatever to find a
solution to this problem. If you know, please let me know please. Thanks

Waleed
waleed072098Asked:
Who is Participating?
 
DigiWizConnect With a Mentor Commented:
Vista Pro is a commercial application that uses real world geological information.  .DEM is an industry standard format that is used and produced by VistaPro.  It is available in both Windows and MAC I think, I only cost about $49.  It will allow you to do real time flythroughs of your data, and will show water, land, mountian, snow and tree information. I have used in in many forensic animations where real world data was critical.
To see some good examples of the work done with it try : http://www.anakin1.demon.co.uk/vista.html.  Where you can find the software, I have no idea.  Last time I personally used it was back in '95.  
0
 
ozoCommented:
How about turning z into a color?
0
 
waleed072098Author Commented:
To OZO

I don't want to turn the Z value into a color. I need it as a value so I can perform my calclation. To summarize, I want to keep the DEM colors + the z's and then convert the whole thing to GIF/JPEG (the color and keeping the z values somewhere)
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
JaccoCommented:
You could embed 2 images in a GIF making it an animated gif. The images would be of the same size. The first would contain the color information and the second the z values. Use the NETSCAPELOOP block or the IEXPLORERLOOP block you can set it so that is doesn't animate.

Maybe it is possible to get info about the second image (that will be download with the GIF) from within a java module

Regards Jacco
0
 
waleed072098Author Commented:
jacco

You completely misunderstand my question !
0
 
JaccoCommented:
I think I did understand correctly.

Compressed information can only be stored in image frames.

You can also add custom block to you GIF file (but be aware that you should use a SIGNATURE for that block that isn't already used by some other GIF manufacturer like Netscape or Explorer and Autodesk).

It is possible to add this information and I could show you how to do it. But I need more information of what you are capable of from whitin Java (because I don't know Java)

I DO know GIF however. I have written compressors and decompressor the can pack/unpack (animated) GIF files.

Let me know in more detail what you need and I might be able to answer your question.
0
 
waleed072098Author Commented:
Jacco

You might have a solution to my problem. SEE my last message !
0
 
JaccoCommented:
Suit yourself and find help somewhere else.
0
 
waleed072098Author Commented:
Jacco,

What is wrong. Why is that ? I really don't know. All I said is



      You might have a solution to my problem. SEE my last message !

Which is good I think
BTW my message which I indicated was not displayed . Sorry for the misunderstanding
0
 
JaccoCommented:
Ok, a misunderstanding can happen. Your last message stated:

"You completely misunderstand my question !"

That is the reason why I got a upset.

Now can you post some details on your question?

Jacco

0
 
waleed072098Author Commented:


No, don't be upset my friend. When I said that I was just joking. Nothing is serious. The problem again is

THIS IS THE MESSAGE:

I have a raster image (DEM- this special file format) contain x,y,z values
I want to convert it to GIF/JPG so I can display it in my java program. The problem is If you convert to GIF then the z values will be lost. Ok ?
      Now I can save the z values in ascii file. Java then displays the gif & reads the data from this ascii file. The problem with this is time . My application requirs fast and real-time processing.
      Thw question is: Is there a way to convert the DEM image to GIF and encode the z values in it? Thanks  

0
 
JaccoCommented:
There is no standard software available for doing what you want. You'll have to write you own converter.

For that reason I want to ask you the following questions:
a) What programming language do you want to use to make the conversion? (I use Delphi 2 and 4).
b) I what type of GIF-chunk do you want to store the information in. You can add a comment block or a second image block (that doesn't get displayed but is downloaded via the web).
c) How are you going to access the depth information from your web page. Do you know Java well enough to handle file access?

Jacco
0
 
waleed072098Author Commented:


No, don't be upset my friend. When I said that I was just joking. Nothing is serious. The problem again is

THIS IS THE MESSAGE:

I have a raster image (DEM- this special file format) contain x,y,z values
I want to convert it to GIF/JPG so I can display it in my java program. The problem is If you convert to GIF then the z values will be lost. Ok ?
      Now I can save the z values in ascii file. Java then displays the gif & reads the data from this ascii file. The problem with this is time . My application requirs fast and real-time processing.
      Thw question is: Is there a way to convert the DEM image to GIF and encode the z values in it? Thanks  

0
 
waleed072098Author Commented:


No, don't be upset my friend. When I said that I was just joking. Nothing is serious. The problem again is

THIS IS THE MESSAGE:

I have a raster image (DEM- this special file format) contain x,y,z values
I want to convert it to GIF/JPG so I can display it in my java program. The problem is If you convert to GIF then the z values will be lost. Ok ?
      Now I can save the z values in ascii file. Java then displays the gif & reads the data from this ascii file. The problem with this is time . My application requirs fast and real-time processing.
      Thw question is: Is there a way to convert the DEM image to GIF and encode the z values in it? Thanks  

0
 
waleed072098Author Commented:
>There is no standard software available for doing what you >want. You'll have to write you own converter

Ok, No problem

>a) What programming language do you want to use to make the >conversion? (I use Delphi 2 and 4).

Any language that does the job. If Delphi, I will learn but how the complexity ?

>b) what type of GIF-chunk do you want to store the >information in. You can add a comment block or a second image >block (that doesn't get displayed but is downloaded via the >web).

Any GIF that can be read by the borowser and should be loosless

>c) How are you going to access the depth information from your >web page. Do you know Java well enough to handle file access?

I will use Java as a client side and CGI with perl. Yes I know java and perl.

0
 
waleed072098Author Commented:
jacco,

 I have sent you the answer to the quastions you wanted am waiting to hear from you.
Thanks
0
 
JaccoCommented:
Can you send me a specification of the DEM file format?

I might be able to write the converter.

My time is limited but I can give it a shot.

Learning Delphi yourself is worth the effort, but it is not something you can do in 1 day.

Jacco
0
 
waleed072098Author Commented:
Hi jacco,

How can I send you a DEM file? What is your email ?
Because all my images are DEM's, do n't you think I need to learn it. But the question is after learning Delphi, how much time I need to coonvert the image ?
How complex it is ? Is it similar to C or easier or what ?

Thanks
0
 
waleed072098Author Commented:
Jacco,

Can you reply, please. We need to finish it up.
0
 
doolyCommented:
Hate to jump into this one, but is there any reason you can't read the z-values from the DEM file, then convert to GIF?
0
 
webrageCommented:
Sorry but cant u just take zvalues make a colormap save it as a gif then convert the dem file to an gif with no zvalues, now u have a imagefile and a zfile
and then in java open both files into a twodim array like myArray[64000][2] where the first dim is colorvalue from the map and the second dim is the zvalue! That is what how I would do it anyway!
0
 
DigiWizCommented:
Did anyone thing of loading the .DEM file into VistaPro and then exporting the data table into a comma delimated format?  

If you don't know about VistaPro it will actually allow you to view the DEM file in a true 3D perceptive and do a fly by if you want.
0
 
waleed072098Author Commented:
To DigiWiz

What is the VistaPro and where can I find it.

I need to now more about it and does it dolve my problem
0
 
waleed072098Author Commented:
To Jacco

Why dont you reply to my emails ?
I need to finish what we have started
0
 
waleed072098Author Commented:


DigiWiz,

Please respond.    

  What is the VistaPro and where can I find it.

      I need to now more about it and does it dolve my problem





0
 
waleed072098Author Commented:
To Jacco

      Why dont you reply to my emails ?
      I need to finish what we have started please
0
 
webrageCommented:
hmmm found this site when searching on altavista...
http://www.okino.com/conv/imp_vpro.htm
0
 
waleed072098Author Commented:
Waiting for Jacco to answer

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.