Jump to content
Sign in to follow this  
Guest stentor

Read_dem not working for me

Recommended Posts

Guest thrimur

Hi I am doing my first mesh scenery and I am reading and testing everything I get on the subject. I have downloaded gtopo30 tile and cut out the area that I wish to change saved it as USGSdem with 3dem and was trying to convert it with read_dem. Do I just drag and drop the file over the read_dem? I tried that a DOS box appeared but nothing happened, what am I doing wrong. Please make this a dummies guide.I also downloaded microdem and tried to use that but I dont know how to save the fil as USGS dem thrimur

Share this post


Link to post
Share on other sites
Guest sgreenwood

Hi,>I also downloaded microdem and tried to use that but I dont know>how to save the fil as USGS dem No need to. Save the file as BSQ. Resample can use this format directly.Stevewww.fs-traveler.com

Share this post


Link to post
Share on other sites
Guest thrimur

Hi Steve, how do I save the file as BSQ, do I need another program for that?thrimur

Share this post


Link to post
Share on other sites
Guest sgreenwood

No. Load the DEM into Microdem, then select File->Save DEM->16-bit BSQ. This is a recent (and welcome) enhancement, so be sure you have a current version of Microdem.Steve

Share this post


Link to post
Share on other sites
Guest thrimur

OK now I understand, my microdem doesn

Share this post


Link to post
Share on other sites
Guest pecrowther

Steve,I downloaded what I thought was the latest version of Microdem (v 7.01 alpha) and I do not see any file save options. All I see isFile -> Save ImageFile -> Save Map as ImageFile -> Save RFP MergeOr do you use the "In/Out" conversion?Phil

Share this post


Link to post
Share on other sites
Guest sgreenwood

[table][tr][td width=280]Hi Phil,I'm using Version 7.0 Alpha build 14.60.10.1 (Dec 2003). Here is my menu tree for this option.Check Options->Program tab and be sure you have the Regular menu selected in the Menus section. This alters the program "mode" and does affect menu options available.Steve[/td] [td]http://forums.avsim.com/user_files/56693.gif[/td][/tr][/table]

Share this post


Link to post
Share on other sites
Guest jkvato

When you download and install the 30MB "complete install" of Microdem, you are not actually getting the most recent version of the EXE file. You need to download the most recent executable from the following location:http://www.usna.edu/Users/oceano/pguth/mic...32/microdem.zipUnzip that into your Microdem installation directory and you should be able to get the menu tree that Steve shows in his screenshot.Hope this helps,

Share this post


Link to post
Share on other sites
Guest pecrowther

Thanks Steve and John,I swtiched it to a "non-normal" menu setting and then back, and it now shows the save menu.I downloaded the new Microdem and it refused to work. Apparently, you have to also download a new dll which is listed separately on their website. (As far as I know, that is the first time they have made that kind of change.)It works fine now.Thanks again,Phil

Share this post


Link to post
Share on other sites
Guest thrimur

I also got it to work, I only had to download netcdf.dll separately,from http://www.usna.edu/Users/oceano/pguth/microdem/win32/ and put into microdem folder.Thanks for the help, and now onto the next step, creating the .inf file. where can I get this LOD calculator that I read about in the forum?Thrimur

Share this post


Link to post
Share on other sites
Guest pecrowther

Now that I have got it working, I find that for some reason I cannot get Microdem to save files of the same resolution as the ones loaded. For example, I am working with a 10 meter dem which is about 45,172 kb. However, when I save the file as a dem, it is only about 1/3 the size and, when I load it in another of my dem viewer programs, the file looks like a series of plateaus. How do I get Microdem to avoid losing resolution?(I am posting this here only because you might run into the same problem.)Regarding your question, you might download Cellgrid2004a. It contains the LOD calculators and also contains programs for creating grids on your area of interest.I have added a subfolder to my Addon Scenery folder called "Grids". Grids has two subfolders, "scenery" and "textures". In the scenery folder, I put the bgl file assembled by Cellgrid. In the texture folder, I put the Cellgrid textures. I then activate (or deactivate) the grids just like any other scenery.Phil

Share this post


Link to post
Share on other sites
Guest thrimur

thanks for the reply, but I know cellgrid,and the programs included I have used them several times with coastlinemaker (but maybe not that well), I was looking for semething to help me filling out .inf file correctly so I can resample my DEM to .tmf file and then to .bgl this is a step I cant

Share this post


Link to post
Share on other sites
Guest pecrowther

Here is what I did to convert DEMs to a bgl file.I created a directory on my C drive with a simple name, like "x1" and put "read_dem.exe" and the dem file (e.g. sample.dem) in that directory.I enter DOS mode using "command prompt". To get to my directory, I type:cd c:x1To execute read_dem, I type:read_dem sample.dem sample.datThis will produce a file (sample.dat) that can be processed into a bgl file with resample.The next step is to create an inf file (e.g. Sample.inf) using notepad. (Note that when you run read_dem, the program will print out a lot of the data that you can use to create the inf file, e.g., the number of lines and columns.)Here is the kind of inf file that I am using (you can cut and paste this into notepad):[Destination] LOD = Auto DestDir = "." DestBaseFileName = "sample" UseSourceDimensions = 1[source] Type = ElevS16LSB SourceDir = "." SourceFile = "sample.dat" Lat = 15.125 Lon = 145.5 NumOfCellsPerLine = 2706 ;columns NumOfLines = 2783 ;rows; 15 minutes is 25 percent of 1 degree, so using .25 CellXdimensionDeg = 9.2421441774491682E-005 ;.25/(2706 cols-1) CellYdimensionDeg = 8.9831117499101688E-005 ;.25/(2783 rows-1) ScaleinMeters = .1Note that you will have to make some changes for this to work on your dem.You should be able to get the lat/lon from the information file that came with the dem (although I am not sure if you need to adjust this if you have cut out a piece)You can get the rows and columns from the read_dem printout.You will have to calculate the CellXdimensionDeg and CellYdimensionDeg and to use the appropriate Scale in Meters. The information above is for a 10 meter dem.You can drag and drop the info file into resample and it should produce the bgl file for you. If it does not, then you can run it in DOS by putting the inf file and resample into the x1 directory and going to that directory. Type: "resample sample.inf" and see what happens. Sometimes it will kick out with an error message. Sometimes it will keep going on forever. More likely it should produce the bgl.You can examine the bgl using tmfviewer to see if it looks about right. If not, make the appropriate changes to your inf file and try again.I hope this helps. And if any of you more experienced hands see anything wrong with the above, let us know. I am learning along with everyone else.Phil

Share this post


Link to post
Share on other sites
Guest thrimur

Thanks for the reply, I have made my first .dat file. Now I don

Share this post


Link to post
Share on other sites
Guest pecrowther

I never did figure out (or have to figure out) the easting and northing information. In my case, the lat/lon information for the northwest corner was in the info file packed with the dem.You are correct that you will have to watch the proper signs for lat/lon. My mesh was in the Pacific.If you do a search on this forum, you may be able to find an example of an info file that is more appropriate to your locale and gtopo30 dems.

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...