Solved

Can we convert to GIF and keep z's values

Posted on 1998-07-21
28
222 Views
Last Modified: 2010-04-06
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
0
Comment
Question by:waleed072098
  • 16
  • 6
  • 2
  • +3
28 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 1112863
How about turning z into a color?
0
 

Author Comment

by:waleed072098
ID: 1112864
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
 
LVL 10

Expert Comment

by:Jacco
ID: 1112865
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
 

Author Comment

by:waleed072098
ID: 1112866
jacco

You completely misunderstand my question !
0
 
LVL 10

Expert Comment

by:Jacco
ID: 1112867
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
 

Author Comment

by:waleed072098
ID: 1112868
Jacco

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

Expert Comment

by:Jacco
ID: 1112869
Suit yourself and find help somewhere else.
0
 

Author Comment

by:waleed072098
ID: 1112870
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
 
LVL 10

Expert Comment

by:Jacco
ID: 1112871
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
 

Author Comment

by:waleed072098
ID: 1112872


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
 
LVL 10

Expert Comment

by:Jacco
ID: 1112873
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
 

Author Comment

by:waleed072098
ID: 1112874


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
 

Author Comment

by:waleed072098
ID: 1112875


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
 

Author Comment

by:waleed072098
ID: 1112876
>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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:waleed072098
ID: 1112877
jacco,

 I have sent you the answer to the quastions you wanted am waiting to hear from you.
Thanks
0
 
LVL 10

Expert Comment

by:Jacco
ID: 1112878
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
 

Author Comment

by:waleed072098
ID: 1112879
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
 

Author Comment

by:waleed072098
ID: 1112880
Jacco,

Can you reply, please. We need to finish it up.
0
 
LVL 1

Expert Comment

by:dooly
ID: 1112881
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
 

Expert Comment

by:webrage
ID: 1112882
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
 
LVL 1

Expert Comment

by:DigiWiz
ID: 1112883
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
 

Author Comment

by:waleed072098
ID: 1112884
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
 

Author Comment

by:waleed072098
ID: 1112885
To Jacco

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

Author Comment

by:waleed072098
ID: 1112886


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
 

Author Comment

by:waleed072098
ID: 1112887
To Jacco

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

Expert Comment

by:webrage
ID: 1112888
hmmm found this site when searching on altavista...
http://www.okino.com/conv/imp_vpro.htm
0
 

Author Comment

by:waleed072098
ID: 1112889
Waiting for Jacco to answer

0
 
LVL 1

Accepted Solution

by:
DigiWiz earned 100 total points
ID: 1112890
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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Many programs have tried to outwit PowerPoint in terms of technology and skill. These programs, however, still lack several characteristics that PowerPoint has possessed from the start. Here's why PowerPoint replacements won't entirely work for desi…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
In this Micro Tutorial viewers will learn how to remove an unwanted object using Photoshop’s feature known as content-aware fill.
Learn how to use the remote presentation tool in Prezi to allow you to harness the power of this cloud based presentation platform. You can show your presentation with a remote audience using this free tool.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now