Archived

This topic is now archived and is closed to further replies.

Holger

Does it get any simpler?

Recommended Posts

I was working my way thru the forums looking for info on how to updateterrain resolution. I found several variants to get a number of DEMformats converted to a BGL and the tools required to get there. Mostapproaches looked/sounded far more complex than what I was wanting toget into, so when I discovered that the USGS Seamless Data DeliverySystem allowed one to procure dem data in 2 byte signed intergerformat (BIL), the stuff Resample.exe can chew on directly, I gave ita shot and it worked the first time... no errors!Therefore, these are the steps I'm using to create LOD 10 terrain.1. Go to http://seamless.usgs.gov/2. click on one of the viewers (US viewer for me).3. wait for interface to load and map to display (jave script security options for your browser must be set to allow image changes).4. on the right hand data selection options for Download Layers, select SRTM 30m, clear all others. And in the Display Layers, clear all but SRTM 30m Shaded and country/state boundry layers then refresh the map (scroll to the bottom for that button). Of course, do play with the various data layer options. You may find them important and/or useful. Same for the Download Layers. You can get some useful info delivered to you as well.5. use the magnifier + tool to drag a zoom in box around the geographical region of interest.6. use the Download rectangular selection tool to click and drag out a selection area (I settled on roughly 40 to 50 miles on a side as gaged by the legend scale). When the mouse button is released, an order request window appears.7. close the window if the size of the area results in a product that's over 100 MB as such can't be downloaded (mine were around 30 to 50 megs) and drag out a smaller selection box.8. in the order request window, click on the 'modify data request' button and change the delivery format from the default ArcGrid to BIL, then click on Save Changes button (bottom of screen).9. Back at the request screen, notice the much smaller estimated package size. Click on the download link and wait for the raster extraction and archive processing to work. When done, a Save As dialog box appears. Save the file where best for you on your hard drive. (the zip file makes the file size even smaller than the estimate).10. Open the archive and extract the contents to the folder where resample.exe is located.11. load the BIL data into Microdem, Global Mapper, Grass, or other similar dem viewer/editor (you really only need just the files named with a number... *.bil, *.hdr, *.prj, *.blw)12. Get the lat/lon coords for each corner and the number of columns and rows (some of this will be in the HDR file contained in the archive). Some viewers will even show you the degrees per pixel value, otherwise compute them by (N lat - S lat) / rows and (W lon - E lon) / columns.13. Write an INF file for Resample per SDK using the above coords and values. The Source file will be the BIL from the archive. The Destination can be whatever you want the BGL file to be named.14. run the INF thru Resample and toss the resulting BGL into your FS Addon Scenerey/scenery folder.15. That's it.The hard part is writing the INF file and maybe getting the EXACTdecimal coords and pixel aspect ratios, but I've noticed that myrather random drag and draw selection boxes all produced productsthat the USGS processed such that the degrees/pixel values were both2.7777777778e-4. Oh, SRTM 30m is best resampled at LOD 10 (38.2m).LOD 11 (19.1m) just makes for a larger file without hardly anynoticable mesh detail improvement because nearly all the fine detailis visually masked by the terrain textures and scenery objectsanyway).There is one big problem with this direct DEM to BGL approach...SRTM data has holes/missing data typically around water (radar musthave issues with it). These will leave craters and pits as thelack of data is considered sea level. The only recourse is totouch up the data in your DEM editor and export or save in 2 bytesigned binary format (Global Mapper can save BIL in various flavors.2 byte signed integer is the correct one, not BIL or BSQ).Hope this mini tutorial is helpful.

Share this post


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

Hi Dean:thanks for writing up the tutorial; it's great to keep threads like these bookmarked!Given the title of your thread, here are a few suggestions for making things even easier.No.4: why SRTM? I have heard that the 1-arcsec (~30-m) SRTM data have slightly better definition than the NED 30-m data available from the same site but haven't seen any visual evidence. However, the NED 30-m data have the huge advantage of not having any holes or other inaccuracies (a while back I posted a screenshot of the downtown Chicago area in SRTM 30: it's a mess because the radar signal gets scattered every which way). Therefore, I suggest to select NED instead of SRTM-30 for any mesh work in the US. The only exception would be Alaska, because the NED data come in a different datum, which one would have to project to NAD83 before use in FS.No.5-6: If you know the area you're interested in (i.e., from an atlas) it's easier to select the area via the "Define Areas by Coordinates" link in the lower left. In the new window I first click on "Switch to decimal degrees" then "Clear Fields", which allows to quickly enter the corner coordinates. Click on "Add area" and you're ready to go.No.9: Once you have decided on an area it's a good idea to bookmark the request page, as sometimes the server is really slow and you might want to try again later.No. 11/12: No need to use a viewer other than Wordpad: the .hdr file contains the number of rows (NumOfLines) and columns (NumOfCellsPerLine) and the .blw file the other required data for your .inf file, for example:0.00027777777780 --> CellXdimensionDeg0.00000000000000 0.00000000000000 -0.00027777777780 --> CellYdimensionDeg-115.62486111236102 --> Lat (NW corner)49.09986111295908 --> Lon (NW corner)No. 13: see above; .hdr and .blw contain all necessary information - just choose the appropriate LOD value and the in/out directories.Perhaps others have even better ideas and tricks ;-).Cheers, Holger

Share this post


Link to post
Share on other sites

> No.4: why SRTM? the NED 30-m data have the huge advantage> of not having any holes or other inaccuraciesI didn't bother investigating what rez the plain NED was atand opted for what was plainly defined as 30m. 1/3 Ned is 10mdata and like said, that fine of detail is lost anyway due tothe textures (that detail can only be seen if you're right ontop of it or if all the textures were removed so you could seethe shadowing on a smooth, uncluttered surface and then onlywhen the sun is low in the sky). Another case of bigger notbeing better.> No.5-6: If you know the area you're interested in (i.e., from> an atlas) it's easier to select the area via the "Define Areas> by Coordinates"Yep, I do use that quite often too. Most of the tutroials orinstructions for mesh generation is a couple years old at atime when the SDDS and these other delievery formats like BILwere not around at the time. Just thought an update for thenewbs was in order as I am one. hehe> No. 11/12: No need to use a viewer...> No. 13: see above; .hdr and .blw contain all necessary> information - just choose the appropriate LOD value and the> in/out directories.That's for the "correction." I hinted at that, but since I wasn'tat my home workstation when I wrote it all up, I didn't rememberexeactly what file had what. Thanks for the refining tips and reply, Holger. :-)

Share this post


Link to post
Share on other sites

Howdy:"I didn't bother investigating what rez the plain NED was atand opted for what was plainly defined as 30m. 1/3 Ned is 10mdata and like said, that fine of detail is lost anyway due tothe textures (that detail can only be seen if you're right ontop of it or if all the textures were removed so you could seethe shadowing on a smooth, uncluttered surface and then onlywhen the sun is low in the sky). Another case of bigger notbeing better."Just my point: a lot of people have heard about the SRTM data and use it for mesh making of US areas even though better data (no holes or spikes!!!) has been available for many years. As for the resolution of the NED data, I was referring to the 30-m resolution, which is available nationwide (Alaska data are 90m). However, if you can find 10-m NED data for your area, there might be advantages in using those instead. As Steve Greenwood keeps pointing out, even if you compile the 10-m data at LOD9 or LOD10 they will be slightly better in accuracy than a LOD9 or LOD10 mesh made from 30-m data, simply because the raw data are more accurate.Cheers, Holger

Share this post


Link to post
Share on other sites

Dean & Holger:Thanks by the tips of both.I didn't know about possibility to configure coordinates to select area.By the way, I've some considerations about:1) Time of downlod of at that site is to high. One hour todownload 20Mb of BIL. And I have wide band. The velocitydrops for 1/3.2) Time to downlod HGT is quite faster. One hour to download40 files. You select multiple files and click on COPY.The speed is normal.3) Okay, you have programs to extract info from BIl file,and create an INF. Some information come with package.And resample it, after all. But how you do to clean upthe BIL file, before?4) I agree, they are methods and methods, incluing thecomplicate ones.5) Finally, I can't see no advantages to get free data from thatSeamless site. You have the same in HGT version, much friendlyand easier to manipulate. By other side, you can order and payfor the CD's. More commercial and elegant way.Holger, you're a gentleman. If I'm wrong, plese do correct me.Cheers, my best wishes for bothCelso

Share this post


Link to post
Share on other sites

Thanks for the tips...One question... where do I get the Resample.exe??????I havnt made mesh in a while and forgot where all the tools are at.

Share this post


Link to post
Share on other sites

Ok See if I have this INF right..This is the info from the HDR and the BLW---------------------------BLW file0.000277777777800.000000000000000.00000000000000-0.00027777777780-162.6051389018990460.36930556038514-----------------------------HDR FileBYTEORDER ILAYOUT BILNROWS 7386NCOLS 4471NBANDS 1NBITS 16BANDROWBYTES 8942TOTALROWBYTES 8942BANDGAPBYTES 0------------------The test.inf fileDestination LOD= 10 DestDir= .done DestBaseName= Test UseSourceDimensions= 1Source Type= Elevs16LSB SourceDir=C:BIL SourceFile= Test.BIL Lat= 60.36930556038514 Lon= -162.60513890189904 NumOfCellsPerLine= 4471 NumOfLines= 7386 CellXdimensionDeg= 0.00027777777780 CellYdimensionDeg= -0.00027777777780 ScaleinMeters = 1.0-----------------------------------Ok is that correct? or am I missing something?Why I am asking is cause when I try to run the inf thru the resample,I get this error..."Missing required parameter."Never tryed it this way.. so this is a new learning experiance for me.

Share this post


Link to post
Share on other sites

Try this:[Destination]LOD = 10DestDir = ".done"DestBaseName = "Test"UseSourceDimensions = 1[source]Type = Elevs16LSBSourceDir = "C:BIL"SourceFile = "Test.BIL"Lat = 60.36930556038514Lon = -162.60513890189904NumOfCellsPerLine = 4471NumOfLines = 7386CellXdimensionDeg = 0.00027777777780CellYdimensionDeg = -0.00027777777780ScaleinMeters = 1.0

Share this post


Link to post
Share on other sites

Howdy:If it's not the missing brackets then perhaps the negative CellYdimensionDeg value might be the problem. I've never tried using a negative value but know that using the BLW value as a positive number works. Cheers, Holger

Share this post


Link to post
Share on other sites

Hi David.Holger's right... I missed the negative number... get rid of the minus sign.[Destination]LOD = 10DestDir = ".done"DestBaseName = "Test"UseSourceDimensions = 1[source]Type = Elevs16LSBSourceDir = "C:BIL"SourceFile = "Test.BIL"Lat = 60.36930556038514Lon = -162.60513890189904NumOfCellsPerLine = 4471NumOfLines = 7386CellXdimensionDeg = 0.00027777777780CellYdimensionDeg = 0.00027777777780ScaleinMeters = 1.0Dick

Share this post


Link to post
Share on other sites

ok that did it!But, it only produces a 1kb bgl fileSo... what I do wrong this time....If you need to see my actual inf file I will post it...

Share this post


Link to post
Share on other sites

Ok I see what my problem was.. dumb old me...After a re writing the inf file acouple of 34 times I realized I had the lat and long mixed up and put in the wrong plases... DUH!!!

Share this post


Link to post
Share on other sites

Its been a long time since no one wrote something here...Hi all, I am just looking for a challenge and I decided to do some small scenery for my area and I started reading around but I was never able to get answers so I decided to ask them here where there`s the right people.To cut the reading short, if there is a tutorial on how to do ultrahigh photorealistic scenery for FSX, I can start with this. but I couldn`t find anything in the last 2 days.I know where I can get 1arcsec srtm data and I found also a place with 1/3arcsec data (USGS) but this time I am not too sure yet what type of format it is nor if it is useful. Maybe someone know the answer to this. On this USGS site, there is even more precise elevation data such as LIDAR measurement. But I haven`t found a converter for that type of precision. What I was able to find was at best 1arcsec to bgl converter. but nothing that can deal with this precision.They also seems to provide some satellite imaging but at this point I didn`t look too deep into this yet.Also, from what I know, there is no point in let say having 10m precision if the overlay scenery is precise at 30m. The area I am looking to work on is nearby an airport so I would prefer to use as accurate as possible for the scenery. I am not planning to create an area where I`ll be flying over at 40000ft and it will be limited in size as well. I`ll be glad to get any kind of help on this.cheers,Stephane

Share this post


Link to post
Share on other sites