POV-Ray : Newsgroups : povray.general : heightfields and DEM and Geotiff Server Time
5 Aug 2024 06:14:38 EDT (-0400)
  heightfields and DEM and Geotiff (Message 2 to 11 of 11)  
<<< Previous 1 Messages Goto Initial 10 Messages
From: ingo
Subject: Re: heightfields and DEM and Geotiff
Date: 19 Dec 2002 11:18:05
Message: <Xns92E9B0ED381CDseed7@povray.org>
in news:web.3e01edcaa4e30c861d8a41ce0@news.povray.org Jim wrote:

>    Anyone know, by experience,

Not by experience but,

> of a program that will do the conversion?
>    Grayscale or Povray Targa?
> 

you could try Leveller with the approriate plug in:

http://www.daylongraphics.com/products/leveller/index.htm

Ingo


Post a reply to this message

From: Christoph Hormann
Subject: Re: heightfields and DEM and Geotiff
Date: 19 Dec 2002 12:38:07
Message: <3E0203FE.6D368FE2@gmx.de>
Jim wrote:
> 
> Hi,
> 
>    I've just finished an exhaustive search for a way to copnvert DEMs
> (Digital Elevation Map)to the Povray heightfield Targa format. No matter
> what program/s I use, the result distorts the elevation data in some way.
> 
> [...]

If your map is in an uncompressed integer format you can use HCREdit:

http://www-public.tu-bs.de:8080/~y0013390/hcredit/

to convert it.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 07 Dec. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: gonzo
Subject: Re: heightfields and DEM and Geotiff
Date: 19 Dec 2002 13:50:05
Message: <web.3e02136f785b7ef7d843c24b0@news.povray.org>
Jim wrote:
>Hi,
>
>   I've just finished an exhaustive search for a way to copnvert DEMs
>(Digital Elevation Map)to the Povray heightfield Targa format. No matter
>what program/s I use, the result distorts the elevation data in some way.
>
>   From www.terrainmap.com: all programs yield a "red" or "blue" version
>          of the "green" Targa map.
>   DEM2Pov: This common program is for 1:250,000 scale DEM and not the
>           1:24,000 I'm using.
>   SDTSEPOV: Sol Katz's program converts the 30 meter DEM but not the new
>           10 meter versions.
>   Arcview 3.2a: no go.
>   3DEM: no go.
>   dlgv32pro/Global Mapper: no go.
>   Wilbur: no go.
>   Genesis II: no go.
>   OSSIM: no go.
>
>   The same for others. Either the map is not correctly produced or a
>grayscale limited to 256 "colors"/elevations results.
>   Either the 16-bit grayscale or a Povray Targa would work but, to date
>only Sol Katz's program works and that, only with the 30 meter files.
>   Anyone know, by experience, of a program that will do the conversion?
>   Grayscale or Povray Targa?
>
>                                            Thanks,
>                                             Jim



Well, a two step process would be use the Firmament import plugin for
Terragen to import the DEM, generate the terrain then save as a .ter file,
then import that into Forester which can make a POV .tga
I haven't used any DEMs so I don't know if Firmament handles all the
different versions you refer to, but IIRC it lists a couple in the readme.

RG - If God had wanted one application that did everything, he wouldn't have
created Unix


Post a reply to this message

From: Jim
Subject: Re: heightfields and DEM and Geotiff
Date: 19 Dec 2002 23:45:03
Message: <web.3e029fd9785b7ef7e5635a5e0@news.povray.org>
Thanks for your suggestion. I'm considering all possibilities but
consider full scale commercial software a last resort. Perhaps a small
conversion utility, but not elaborate scene visualization packages.
   As for HVR-Edit,  I tried a text file and
the program either gave a black screen or crashed.
   The text file was a simple listing of integer elevation values from
an ArcInfo Ascii export, with the header removed and all decimals
converted to integers and "nodata" areas replaced with zeros.
   The elevation values (448-1100) were separated by spaces with
467 values per line (height) and 379 lines (width).
   Do I presume the input file needs to be in binary as
opposed to an ASCII text file?

                                Thanks,
                                 Jim


Post a reply to this message

From: Mark Weyer
Subject: Re: heightfields and DEM and Geotiff
Date: 20 Dec 2002 04:42:39
Message: <3E02E883.C5771329@frege.mathematik.uni-freiburg.de>
>    The text file was a simple listing of integer elevation values from
> an ArcInfo Ascii export, with the header removed and all decimals
> converted to integers and "nodata" areas replaced with zeros.
>    The elevation values (448-1100) were separated by spaces with
> 467 values per line (height) and 379 lines (width).

If you have got this far, it should be easy manually to manually
create a PGM (portable gray map) from it: Just add one line at the
beginning containing

P2 467 379 1100

Then any decent image manipulation program should be able to convert
that into whatever format you want.

  Mark


Post a reply to this message

From: Lenx
Subject: Re: heightfields and DEM and Geotiff
Date: 20 Dec 2002 07:55:03
Message: <web.3e0312f1785b7ef7b0d1d5010@news.povray.org>
wow christoph, your website is soooooo cool!!!!


Post a reply to this message

From: Jim
Subject: Re: heightfields and DEM and Geotiff
Date: 20 Dec 2002 12:00:08
Message: <web.3e034c23785b7ef74f4c2e4b0@news.povray.org>
Hi Mark,

   Thanks for the tip. As it turns out, the PGM format is an 8-bit
format and loses most of the values. If there is a 16/24-bit version
let me know. For that matter, if you know of any 16/24-bit ASCII
based format I'd appreciate your letting me know.

                              Thanks,
                               Jim


Post a reply to this message

From: Christoph Hormann
Subject: Re: heightfields and DEM and Geotiff
Date: 20 Dec 2002 12:31:25
Message: <3E0353EC.D1291E38@gmx.de>
Jim wrote:
> 
> Hi Mark,
> 
>    Thanks for the tip. As it turns out, the PGM format is an 8-bit
> format and loses most of the values. 

That's not true, see:

http://netpbm.sourceforge.net/doc/pgm.html

POV-Ray reads 16 bit ASCII PGMs without problems.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 07 Dec. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Christoph Hormann
Subject: Re: heightfields and DEM and Geotiff
Date: 20 Dec 2002 12:32:48
Message: <3E035440.4AB31762@gmx.de>
Lenx wrote:
> 
> wow christoph, your website is soooooo cool!!!!

Thanks, but you replied to the wrong posting.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 07 Dec. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Jim
Subject: Re: heightfields and DEM and Geotiff
Date: 21 Dec 2002 13:20:03
Message: <web.3e04ae2b785b7ef73448a7970@news.povray.org>
Hi,


   Yes, Christoph, there is a 16-bit PGM format. Due to image browser
problems,
I didn't discover this until I had done some research on the internet.
I had forgotten that I had downloaded PBMPlus a couple of years ago.
The package (now NetPBM) was written by the developers of the format).
   After several hours of research, locating new accessory utilities to
handle the 10 meter file size (9+Mb), I've converted a 10 meter DEM to
Povray's Targa format.
   While I've found the utilities neccessary (and free)to do the job,
I've given some thought to the conversion of PGM to Pov-Targa using
PPM (Portable Pixel Map)from the same developers.
   Eventually, I'll run into scaling problems when I exceed the 65535 limit
on the Targa/PGM formats. The 10 meter DEM elevations, in addition to
adding horizontal (x, y) detail, they also add vertical (z) detail which
shows
up in the form of the addition of a decimal digit to the elevation data
format
where in the 30 meter, all data are integers.
   As an example, The test sample had elevations from 480-1100 meters.
To adapt the data to 16/24-bit PGM format, I had to multiply the data by 10
to remove the decimal point and return the format to integer. Either this
method or the removal of the decimal portion ( which would introduce an
error) had to be done. If not, then I would have had to write a program to
round the decimal portion off, which would also introduce an error factor.
   Given the Povray Targa format leaves the blue band open, I wonder if they
might consider using it to expand the graphic resolution to 32-bits.
   Anyway, thanks to everyone for their responses, especially Mark for
reminding me of the Portable Bitmap set of formats.

                                 Thanks again,
                                    Jim

A list of the utilities I ended up using:
 3DEM (DEM manipulation program)
 Wilbur (DEM manipulation program)
 PFE (Programmer's File Editor) - large text file editing
 HL-LAB (John Beale's HeightField Lab):  PGM - TGA conversion


Post a reply to this message

<<< Previous 1 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.