Problems with DEM

Tips and discussion about scenery creation for RailWorks.

Problems with DEM

Unread postby Expressman » Fri Jun 13, 2014 5:24 pm

So I tried the Searchlight tutorial. I know about ReDEM but I'm trying to walk before I run.

Everything seems to have got right. Got my USGS files, converted them, all as per the tutorial. In the end I have 81 .hgt files in my SteamApps/common/Railworks/DEM/SRTM folder.

But when I go into the editor and try the import, nothing happens.

I double-checked the GPS and it's all right.

Also think RailWorks found the files because when I first launched it after creating the .hgt files it look longer to load than usual.

I tried flipping the backslash to a forward slash. Didn't help.

I do have Railworks installed on another drive, but it's been working fine, including seeing my route template files that RWTools created for me.

But here I am, TS2014 and nuttin loading. Any ideas?

Here is a screenshot of my Explorer since the uploader is allergic to .png files.

Image
Expressman
 
Posts: 23
Joined: Mon Mar 31, 2014 11:59 am

Re: Problems with DEM

Unread postby Bananarama » Fri Jun 13, 2014 7:03 pm

Expressman wrote:I double-checked the GPS and it's all right.

Are you absolutely certain of this? If you created the route using an existing template, it's likely that the DEM is offset too far for you to see any change. Have you checked the route folder to see if any terrain files are being created?
Cheers!
Marc - 3DTrains

Image
User avatar
Bananarama
 
Posts: 2749
Joined: Sat Feb 14, 2009 1:17 am
Location: Another Planet

Re: Problems with DEM

Unread postby Expressman » Fri Jun 13, 2014 7:12 pm

Hack wrote:
Expressman wrote:I double-checked the GPS and it's all right.

Are you absolutely certain of this? If you created the route using an existing template, it's likely that the DEM is offset too far for you to see any change. Have you checked the route folder to see if any terrain files are being created?


No, I'm not certain of anything. Forgive me for sounding daft but where/how would I check that? Poking around I haven't figured it out yet.
Expressman
 
Posts: 23
Joined: Mon Mar 31, 2014 11:59 am

Re: Problems with DEM

Unread postby Bananarama » Fri Jun 13, 2014 10:25 pm

Using WordPad, open the route's RoutProperties.xml file and check the lat/lon and the Easting/Northing values. AFAIK, copying (cloning) an existing route will use your lat/lon input, but will use the Easting/Northing to offset the start tile to its new location based on the lat/lon of the original route template. Google Maps works fine either way, but DEM may not - at least I haven't been able to using another route's template.

The only way to prevent this is to create your own route template and export that. You can then create a new route using your new template and replace the old RouteProperties.xml with the new one, or just copy the folders from the old route (everything but the old RouteProperties file) into the new route folder (useful if you already have track and scenery placed).
Cheers!
Marc - 3DTrains

Image
User avatar
Bananarama
 
Posts: 2749
Joined: Sat Feb 14, 2009 1:17 am
Location: Another Planet

Re: Problems with DEM

Unread postby Expressman » Fri Jun 13, 2014 10:35 pm

I do suspect it's loading and I'm not seeing it, but I'm also failing to see the problem. Here is the xml:

Code: Select all
<Origin>
                  <sGeoPosition>
                     <Lat d:type="sFloat64" d:alt_encoding="9F76F86BB2DA4640" d:precision="string">45.7086</Lat>
                     <Long d:type="sFloat64" d:alt_encoding="2A5778978B605EC0" d:precision="string">-121.509</Long>
                  </sGeoPosition>
               </Origin>
               <MapOffset>
                  <sMapCoords>
                     <Easting d:type="sFloat64" d:alt_encoding="0A27C922D457FC40" d:precision="string">116093</Easting>
                     <Northing d:type="sFloat64" d:alt_encoding="54B0D18917505341" d:precision="string">5.06275e+006</Northing>
                  </sMapCoords>
               </MapOffset>


The location smack in the middle of my geo area is 45.708575 by -121.508521.

So as I read it, it seems right. Also matches my drop-in location in the editor.
Expressman
 
Posts: 23
Joined: Mon Mar 31, 2014 11:59 am

Re: Problems with DEM

Unread postby Bananarama » Sat Jun 14, 2014 12:34 am

Expressman wrote:I do suspect it's loading and I'm not seeing it, but I'm also failing to see the problem.

I believe the problem lies with the Easting and Northing values. Try creating your own template, export, and then test to see if that solves things. Only then can you track down where the issue lies.
Cheers!
Marc - 3DTrains

Image
User avatar
Bananarama
 
Posts: 2749
Joined: Sat Feb 14, 2009 1:17 am
Location: Another Planet

Re: Problems with DEM

Unread postby Expressman » Sat Jun 14, 2014 8:37 am

Hack wrote:
Expressman wrote:I do suspect it's loading and I'm not seeing it, but I'm also failing to see the problem.

I believe the problem lies with the Easting and Northing values. Try creating your own template, export, and then test to see if that solves things. Only then can you track down where the issue lies.


Again, sorry for being so "needy" but I'm still on the uptake. I created the template in RWTools with the same coordinates listed above. Then when I created the scenery I used that template.

The Easting and Northing seems like an intriguing number because we would normally expect that close to zero if the template and the scenery are the same, right?

Now, showing my ignorance, I'm not sure what you even mean by create my own template and export. Are you referring to RWTools or TS? And what am I exporting to? I'm clearly confused.

One other thing, in the .hgt file format, is W122 the equivalent of Lon. -122? I haven't found an example of a minus in a .hgt file name.
Expressman
 
Posts: 23
Joined: Mon Mar 31, 2014 11:59 am

Re: Problems with DEM

Unread postby Bananarama » Sat Jun 14, 2014 4:49 pm

Expressman wrote:The Easting and Northing seems like an intriguing number because we would normally expect that close to zero if the template and the scenery are the same, right?

Now, showing my ignorance, I'm not sure what you even mean by create my own template and export. Are you referring to RWTools or TS? And what am I exporting to? I'm clearly confused.

One other thing, in the .hgt file format, is W122 the equivalent of Lon. -122? I haven't found an example of a minus in a .hgt file name.


  1. Easting and Northing are Cartesian coordinates, which are x-y points of a given zone's origin (positive values east+north, negative values west+south). Entering the lat/lon in the blueprint editor will calculate the Easting and Northing values for you upon export.

  2. Try creating a template using the blue print editor. I've never used Mike's utility to create a route, so I don't know the process or whether the program puts everything where it should be. Creating your own blueprint from scratch is easy, albeit tedious. Just use an existing template as a guide to see what needs to be filled in.

  3. Yes, W122 is the approximate longitudinal area for the DEM (I believe the first set of numbers is the zone, but I don't recall). If you're using SRTM *.hgt files, however, the area can be off by as much as 1/2 section, so be certain to have adjacent areas to fill any gaps (w121 and w123, for example). Although there are more hoops to jump through, a better solution would be to obtain USGS *.img data, which has far better resolution and is more accurate than SRTM. It's also a good idea to keep the SRTM data in the DEM folder in case you find holes in the USGS stuff, and you can then generate 1 x 1 or larger tile imports.
Cheers!
Marc - 3DTrains

Image
User avatar
Bananarama
 
Posts: 2749
Joined: Sat Feb 14, 2009 1:17 am
Location: Another Planet

Re: Problems with DEM

Unread postby Expressman » Sat Jun 14, 2014 5:14 pm

I appreciate your patience hack. I'll try generating the new template. Is there a guide or discussion on using .img files?
Expressman
 
Posts: 23
Joined: Mon Mar 31, 2014 11:59 am

Re: Problems with DEM

Unread postby Expressman » Sat Jun 14, 2014 7:51 pm

Interesting comment you made here.

Though I'm not sure what exactly you meant by "...using one of the batch files in the downloaded scripts."

EDIT: Oh my gosh I'm brain dead, you're referring to the conversion scripts you just mentioned. Okay, I might just try that method.
Expressman
 
Posts: 23
Joined: Mon Mar 31, 2014 11:59 am

Re: Problems with DEM

Unread postby Expressman » Sun Jul 13, 2014 11:46 am

UPDATE [Solution Found, see end]:

I spent another half a day on it and I'm still stuck.

The ReDem documentation is outdated when it comes to USGS. I do not see a way to download a .BIL file, and I do have the USGS ARC_2_BIL batch script but it doesn't seem to be working , so I mixed in the Searchlight Sim tutorial that has you download the float and convert it with MicroDem. I was able to load that output into ReDem, which then output the .bin files in Cartesian coordinates. Is that correct?

So, whither I create a new route using say Marias Pass, or a scenery I created in the exact spot in RWTools, either way I still see no terrain when I load.

I'm really, really frustrated. I have the ADF, Float, and IMG of the desired area but for the life of me I can't get it into the game and everyones instructions are impossible to follow exactly mainly because the USGS changed.

UPDATE:

Originally I was putting the files in \RailWorks\DRM\STRM but since it was in cartsian coords I thought it needed more context, so I created a \Terrain folder in my route folder. Holy cow Batman it works:

Image
Last edited by Expressman on Sun Jul 13, 2014 12:04 pm, edited 1 time in total.
Expressman
 
Posts: 23
Joined: Mon Mar 31, 2014 11:59 am

Re: Problems with DEM

Unread postby bnsfsubdivision » Sun Jul 13, 2014 11:54 am

Expressman wrote:UPDATE:

I spent another half a day on it and I'm still stuck.

The ReDem documentation is outdated when it comes to USGS. I do not see a way to download a .BIL file, and I do have the USGS ARC_2_BIL batch script but it doesn't seem to be working , so I mixed in the Searchlight Sim tutorial that has you download the float and convert it with MicroDem. I was able to load that output into ReDem, which then output the .bin files in Cartesian coordinates. Is that correct?

So, whither I create a new route using say Marias Pass, or a scenery I created in the exact spot in RWTools, either way I still see no terrain when I load.

I'm really, really frustrated. I have the ADF, Float, and IMG of the desired area but for the life of me I can't get it into the game and everyones instructions are impossible to follow exactly mainly because the USGS changed.

Any ideas?

Download QGIS: http://www.qgis.org/en/site/ and follow fecrails short tutorial.

fecrails wrote:I spent quite awhile tinkering with QGIS today and figured out how to merge .img files into a single .bil file to use in ReDem.

1. Start QGIS and select Raster > Miscellaneous > Merge
2. The Merge window will open
3. Check the "Choose input directory instead of files" box.
4. Select the folder where the .img files you want to merge are located for the input files.
5. Select the output file and from the file type drop down menu be sure to select .bil file type and name the output file.
6. Click OK to merge the files.

Then follow Hack's instructions to extract projection to generate the missing .blw file
located here: http://www.3dtrains.com/forums/index.ph ... ap-viewer/
Kevin Schulz
Artist - Searchlight Simulations
User avatar
bnsfsubdivision
 
Posts: 822
Joined: Sun Feb 20, 2011 5:27 am

Re: Problems with DEM

Unread postby Expressman » Sun Jul 13, 2014 12:06 pm

Thanks for the reply bnsf, but while you were typing I came upon my solution which I edited into my post above. Your (I think it's yours) tutorial in the PDF simply says "put it in your route" but I was initially confused because it wasn't clear to me I had to create a \Terrain folder.

I will still look over your post because I need to work out the best system going forward. Thanks.
Expressman
 
Posts: 23
Joined: Mon Mar 31, 2014 11:59 am


Return to Scenery Design

Who is online

Users browsing this forum: No registered users and 2 guests