How to do a terrain??

Started by
11 comments, last by sit 19 years, 3 months ago
kalau stakat load file tu simple jek. tapi seperti yg nife cakap, kalau nak load file nak kena tau apa makna setiap parameter tu. apa strukturnya. dan juga untuk buat proses triangulation nak kena dapat olah data tersebut untuk dijadikan input bagi proses triangulation.

bukan masalah besar. cuba fahamkan dulu struktur file dem. kemudian kenalpasti input TIN. kemudian barulah buat loader file dem. amek data dari file dem yg perlu untuk input TIN sahaja. kalau perlu, olah data dari file dem untuk dijadikan input untuk TIN. rasanya, triangulation nih memerlukan vertices(point clouds) sahaja untuk inputnya. simple jek. yg penting nak kena tau apa maksud data dem. dah usha wotsit? dah usha usgs? ada banyak giler documentation untuk file dem.

usha dulu.
Advertisement
I don't know if this is relevant, but from my research on digital elevation maps [as used by the usgs], the specs are something like this

there are 3 regions in the file
Type A, Type B, and Type C

Type A, 1024 bytes and contains info on the file <br>Type C, at end of file, contains info &#111;n the file [precision I gather, also I haven't found good info &#111;n it]<br><br>Type B data is the elevations, south to north, east to west [for 1 degree dem files]<br><br>these sequences of data are spaced to fit into 1024 byte blocks, so a second southernmost point would be at a 1024 byte point<br><br>the elevations are floating point in the fortran format [they use d instead of e for powers of 10]<br><br>1 by 1 degree [1 minute] dem files have 1201 points in each direction, they also seem to have 9 points signifying something [either at the begining or the end…]<br><br>documentation &#111;n what different size dem files and stuff is available from the usgs [united states geological service]….<br><br>also, nasa has dem files of the planet … but I haven't played with them<br><br>oh, you'll want a continous level of detail algorythm, these are a bit large to draw at &#111;nce [4 million faces for two of these, ouch.. .of course it is like 100 miles &#111;ne way, 50 the other]
from looking at the link, looks like things should go like this

read 1024 bytes [type a data]

while I can read 2048 bytes:
read 1024 bytes [type b]
read 1024 bytes until enough elevations have been read for a single profile
remaining 1024 bytes are type c...

I guess

This topic is closed to new replies.

Advertisement