Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

DEM from BGL with TmfViewer

Featured Replies

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

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

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

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

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

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

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.