TransDEM Forum

TransDEM News, Support, Hints and Resources
It is currently 29 Apr 2024 03:35

All times are UTC + 1 hour




Post new topic Reply to topic  [ 14 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Merging Dem files
PostPosted: 06 Feb 2011 13:47 
Offline

Joined: 05 Feb 2011 13:18
Posts: 104
Hello everybody

On the following site ( http://dds.cr.usgs.gov/srtm/version1/Eurasia/ ) I downloaded the zipped HGT-files of my region ( Belgium ).

When opening a hgt-file, I change the Grid Width to 10m.

The hgt-files are converted to Dem-files without a problem.

When I want to create a merged Dem-file by adding a dem file, a pop-up window appears with the message, Dem operation aborted.

Any idea why this happens?

If the used hgt-files are not useable, where can I find useable Dem-files of the Belgian region ( Benelux is also possible ).

Thank you

Best regards

Kurt


Top
 Profile  
 
 Post subject: Re: Merging Dem files
PostPosted: 06 Feb 2011 15:21 
Offline

Joined: 10 Jan 2011 11:31
Posts: 34
Location: Moscow, RU
Dear Belgian.

Operations with DEM merging are very memory intensive (Look at your task manager and see how much memory the program takes)
As a solution to the somewhat cryptic memory handling I save the DEMs, exit the program and load the first DEM and begin merging. If you had several DEMs open, even if you closed them without restarting the program it eat up a lot of memory. I don't know why, perhaps a memory leak, or failure to clear used memory. So save hgt's as DEM, exit the program, start it again and try to merge the DEMs then, monitoring your memory usage.


Top
 Profile  
 
 Post subject: Re: Merging Dem files
PostPosted: 06 Feb 2011 15:23 
Offline

Joined: 05 Feb 2011 13:18
Posts: 104
Hello Damien,

Thank you for your reply. Will try it out.

Already had a try. When I open Transdem, clicking on open Dem - then clicking on add dem - pop up windows appears with DEM operation aborted - when I click on ok in the popup window - I get a completely black dem window.

Best regards

Kurt


Last edited by Belgian46 on 06 Feb 2011 15:29, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Merging Dem files
PostPosted: 06 Feb 2011 15:27 
Offline

Joined: 10 Jan 2011 11:31
Posts: 34
Location: Moscow, RU
Belgian46 wrote:
Hello Damien,

Thank you for your reply. Will try it out.

Best regards

Kurt


Dear Kurt

You are very welcome. And if the DEMs won't merge, don't despair. It probably means the route is too large anyways and won't fit in a single export.
You should input the route and crop away any excessive DEM points that won't be used around the route. Then save the DEM as "Cropped" and restart the program to open the cropped DEM, now it should take up a lot less space in the memory.


Top
 Profile  
 
 Post subject: Re: Merging Dem files
PostPosted: 06 Feb 2011 19:06 
Offline

Joined: 05 Jan 2011 16:45
Posts: 1465
There is no memory leak here (see note below), but it is as Damien_Zhar says: Very memory intensive operations.

However, in this case the solution is easy. When opening the original DEM file, just leave the grid resolution at the default value, probably 60m. That's the most we can get from the 3 arc sec file anyway. Of course, the terrain in Trainz in 10 m or even 5 m, a much higher resolution. But TransDEM is fully aware of this. Once the DEM export to Trainz begins, TransDEM will iterate over all prospective baseboards, and run a temporary on-the-fly conversion of the DEM for each baseboard to the 10 or 5 m grid. As only a small area is involved, this takes much less memory than converting the entire DEM in the first place.

Note: What may look like a memory leak: increasing memory usage in TransDEM with each DEM operation when monitored in the Task Manager, Process Explorer or another profiling tool, is in fact a snapshot of the current data copied to the Undo-stack. In TransDEM 2.1.1 I have slightly modified Undo-stack memory management. If the next DEM operation would fail because of memory exhaustion (2 to 4GB limit), TransDEM will look at the Undo-stack and may free the memory of one or more entries in the stack, hereby losing the associated undo steps, of course.


Top
 Profile  
 
 Post subject: Re: Merging Dem files
PostPosted: 07 Feb 2011 13:23 
Offline

Joined: 05 Feb 2011 13:18
Posts: 104
Hello Roland,

Thanks for the extra info.

When opening the hgt file - I left the width at 60m - dem-file was created.

When I open Transdem, clicking on open Dem and selecting a dem-file, then clicking on add dem and selecting another dem-file a pop up windows appears with the message DEM operation aborted - when I click on ok in the popup window - I get a completely black dem window.

What could be the reason of the message : DEM operation aborted ?

If necessary I can send the hgt file or the hgt-files ( converted into Dem-files ).

Thank you.

Best regards

Kurt


Top
 Profile  
 
 Post subject: Re: Merging Dem files
PostPosted: 07 Feb 2011 14:22 
Offline

Joined: 05 Jan 2011 16:45
Posts: 1465
Most often "DEM operation aborted" is a memory allocation error. TransDEM tries to catch such exceptions but there are a few instances where detection does not work and then TransDEM may crash.

You are trying to merge two 3 arc sec SRTM hgt files. For the "Add DEM" function in TransDEM, the DEM to be added must be in MircoDEM .dem format. Usually the .dem format is produced by saving the DEM in TransDEM. DEM resolution will be the one you picked when opening the original .hgt file.

For the merge to work, both DEMs should be in 60 m resolution. Such a 1 x 1 degree SRTM DEM as a .dem file will have a size of about 9 MB at 60m. (A 1 x 1 degree 10m DEM will have a file size of more than 300MB.)

So, open each of the hgt/zip SRTM DEM files individually, leave the resolution at 60m, and save each file in .dem format (the default). Then open one of the 60m .dem DEMs and add use "Add DEM" to merge with the other 60m .dem DEM.
(For the merge operation of these two 60m DEMs TransDEM will allocate about 70MB, which should not cause issues. Merging with a 10m DEM will require about 700MB.)

Please also make sure that you updated to the latest version of TransDEM which became somewhat more efficient in memory management for large DEMs with version 2.1.1. However, 3 arc sec SRTM DEMs are not regarded as being "large".


Top
 Profile  
 
 Post subject: Re: Merging Dem files
PostPosted: 07 Feb 2011 19:45 
Offline

Joined: 05 Feb 2011 13:18
Posts: 104
Hello Roland,

All updates were installed before starting with Transdem and I used the method in your reply.
So, I restarted all actions 8-) - converted the necessary hgt-files into microdem ( width 60 m) and then started the merging process.

Would you believe it - no errors were received and I could create a complete Belgian dem-file based on the geographic coordinates. :D

Now I can start the next process - getting all into trainz 2010. First step will be - finding a method to get google earth pictures into Trainz. First test didn't give me a great result - the roads, tracks, buildings visible in Google Earth were not visible in Trainz.

Best regards

Kurt


Top
 Profile  
 
 Post subject: Re: Merging Dem files
PostPosted: 07 Feb 2011 20:00 
Offline

Joined: 05 Jan 2011 16:45
Posts: 1465
Great! :)

My recommendation for the next steps, as always :D : Use a map for the ground textures, e.g. Open Street Map. Use ortho-images for UTM tiles. Aerial photos will not be legible as a ground texture, resolution is too low. For UTM tiles you will have to run a few tests to find a suitable scale. The closer your get, the more images you need. I have suggested 500m eye altitude a couple of times in the past, or zoom level 16 or 17 when using the Map Tile client.


Top
 Profile  
 
 Post subject: Re: Merging Dem files
PostPosted: 08 Feb 2011 03:32 
Offline

Joined: 09 Jan 2011 05:40
Posts: 19
Quote:
Note: What may look like a memory leak: increasing memory usage in TransDEM with each DEM operation when monitored in the Task Manager, Process Explorer or another profiling tool, is in fact a snapshot of the current data copied to the Undo-stack. In TransDEM 2.1.1 I have slightly modified Undo-stack memory management. If the next DEM operation would fail because of memory exhaustion (2 to 4GB limit), TransDEM will look at the Undo-stack and may free the memory of one or more entries in the stack, hereby losing the associated undo steps, of course.


Is there any hope maybe getting a 64 bit version with larger memory limits?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: Ahrefs [Bot] and 62 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

Imprint & Privacy

Powered by phpBB® Forum Software © phpBB Group