Sign in to follow this  
Guest christian

DEM from BGL with TmfViewer

Recommended Posts

Hi,I have a BGL mesh file covering 3 (E/W) by 2 (N/S) LOD10 quadrants and opened it with TmfViewer. I made a screenshot of the image and pasted it to a Paint program. As expected, the image size is 768 by 512 pixels. The number of unique colours was 129 which, I suspect, is less than the quantity of different elevations in the original raw DEM file. Still, if we know the algorithm translate altitudes to colours, a fair (if not exact) representation of the DEM is possible. This could be useful for some small mesh corrections as, for example, to create "flat polygons" on an runway/airport area. Even if we own the original DEM there would be an advantage in working at this "LOD resolution" DEM. Any comments?Regards, Luis

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

I found that the resolution is actually resampled to be smaller in TMFViewer (it takes 1 pixel off in the middle and 2 on the corners!). The pixel size of a quad is 257 not 256...I actually load my mesh source files into photoshop to check them. However, it's hard to edit them. There are only 256 colors, but heights can get certainly higher than 256m. That's why height values are 16 bit. That means you end up with 2 channels and will have to paint both which isn't easy... It's do-able, but would be hard work...Cheers, Christian

Share this post


Link to post
Share on other sites

Hi Christian.I recall the Spain Mesh Group had come up with a scheme to avoid the problem, by using RBG channels in a paint program. If you were to use RGB and greyscale, each channel could represent a section of elevation at 8192 meters. That would give you a vertical resolution of 32 meters. The results would need each of the points to be added to regenerate the DEM... You'd get 16 meters resolution, if you confined yourself to above sea level.Actually, you could have as many channels ( bitmaps ) as you wanted... each representing 256 meters height, and 'AND' the points to reassemble the DEM. Sort of like resample's slicing, but done vertically.It might be a little tedious to edit 256 'slices'. :)Dick

Share this post


Link to post
Share on other sites

Dear Christian,Thank you for your comment, but:- the image that TMFViewer generates from my file with 6 LOD10 quadrants is precisely 768 x 512 as if a single LOD is 256 x 256;- when I paste the screenshot into PSP I get a colored bitmap; in that file I got 129 different colors (eg elevations). But I just opened another file with a greater range of elevations and I got 261 colors (more than 256 then).What I would like to know is how elevations are mapped into colors. With a landclasse file it is very easy to discover the mapping and therefore get the default land classe indexes by using the "Highlight LandClass" and anotating the color it translates into the pasted image.I also noted that there is no "Zoom" in TMFViewer. If I open worldlc.BGL alone, each land class quadrant (LOD13) translates to one pixel. However if I restart TMFViewer and open the first mentioned file (3x2 LOD10 quadrants mapping to 768x512 pixels) it seems that zoom scale persits for new opened files. That is: if I open worldlc.BGL again it is shown with much more zoom.Another thing that I do not know is what "QMID..." means.Regards,Luis

Share this post


Link to post
Share on other sites

>It might be a little tedious to edit 256 'slices'. :) This was what I was trying to say :)Cheers, Christian

Share this post


Link to post
Share on other sites

>- the image that TMFViewer generates from my file with 6 >LOD10 quadrants is precisely 768 x 512 as if a single LOD is >256 x 256; Ok, do this:write an inf file and include makebmp=1 in the destination section. Load one of the bitmaps and check the size. it's 257x257!!! I know this since I can read the data section directly from the bgl file and its also 257x257. TMFViewer doesn't give you the full resolution!!!>- when I paste the screenshot into PSP I get a colored >bitmap; in that file I got 129 different colors (eg >elevations). But I just opened another file with a greater >range of elevations and I got 261 colors (more than 256 >then).You still have to convert from rgb (24bit) back to 16 bit and may loose you colours... Cheers, Christian

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this