Train-Sim.Com
MSTS Route Design

Message Areas - "Fix for DEMEX / TSTF in Australia ?"

Train-Sim.Com Message Areas

"Fix for DEMEX / TSTF in Australia ?"

Email this topic to a friend
Printer-friendly version of this topic
Bookmark this topic (Registered users only)
Previous Topic | Next Topic Conferences MSTS Route Design (Protected) Original message
Woozley (37 posts)
Dec-17-01, 07:10 AM (EST) "Fix for DEMEX / TSTF in Australia ?" LAST EDITED ON Dec-17-01 AT 07:19 AM (EST)After testing some of the code in the posts such as 'a glimmer of hope' I found the worldtilename routine gave me errors for Australia. This fix below produces correct results for all my tests. Could this be the problem in DEMEX / TSTF ???Original Code:

void worldtilename(long *wt_ew, long *wt_ns,char *filename) { long wt_ew_min,wt_ew_max,wt_ns_min,wt_ns_max;
char prefix<2>="-";
char append_char<2>="0";
int quad;
long fhex;
long hihex;
int result;
char fname<20>;
char ti<2>="0";
long delta;
//# world tile min/max
wt_ew_min = -16384;
wt_ew_max = 0;
wt_ns_min = 0;
wt_ns_max = 16384;
*wt_ew=-16384;
*wt_ns=0;
delta=16384/2;
...etc
I added this in the header:
char temp<10>;
And this after *wt_ew=-16384;
strcpy(temp,filename);
t<0>=stripchar(temp);
t<0>=stripchar(temp);
if (t<0>=='4') *wt_ew=0; /*for Far East / Australia*/
This seems to work vice using changes to the min/max values mention in the post.PW
Barkin' up a tree
Alert Edit | Reply | Reply With Quote | Top
Table of Contents

Subject Author Message Date ID RE: Fix for DEMEX / TSTF in Austra... steam4me Dec-19-01 1 RE: Fix for DEMEX / TSTF in Austra... JohnCS Dec-21-01 2 RE: Fix for DEMEX / TSTF in Austra... Woozley Dec-22-01 3 RE: Fix for DEMEX / TSTF in Austra... liwile Jan-02-02 4 RE: Fix for DEMEX / TSTF in Austra... timelord Jan-23-02 5 RE: Fix for DEMEX / TSTF in Austra... zorcan Jan-23-02 6 RE: Fix for DEMEX / TSTF in Austra... JohnCS Jan-23-02 7 RE: Fix for DEMEX / TSTF in Austra... zorcan Jan-24-02 8

Lobby | Topics | Previous Topic | Next Topic
Messages in this topic
steam4me (52 posts)
Dec-19-01, 04:30 PM (EST) 1. "RE: Fix for DEMEX / TSTF in Australia ?" Paul,Where do you add these lines?RegardsYuri.

==================================
MSTS Australian Add-ons site
http://www.railpage.org.au/steam4me/trainsim
==================================
Remove | Alert Edit | Reply | Reply With Quote | Top
JohnCS (254 posts)
Dec-21-01, 09:31 AM (EST) 2. "RE: Fix for DEMEX / TSTF in Australia ?" Thanks for the info. FYI that code which Deanville and I had originally posted wasn't exactly correct in other areas also, as it didn't support the larger merged tiles correctly and is not what is actually used in DEM-EX. Remove | Alert Edit | Reply | Reply With Quote | Top
Woozley (37 posts)
Dec-22-01, 09:48 PM (EST) 3. "RE: Fix for DEMEX / TSTF in Australia ?" I kind of suspected this. Thanks John. Remove | Alert Edit | Reply | Reply With Quote | Top
liwile (39 posts)
Jan-02-02, 04:02 PM (EST) 4. "RE: Fix for DEMEX / TSTF in Australia ?" Will it work for all the dems in the southern hemisphere? Remove | Alert Edit | Reply | Reply With Quote | Top
timelord (1 posts)
Jan-23-02, 05:38 AM (EST) 5. "RE: Fix for DEMEX / TSTF in Australia ?" I have had no problems importing USGS GTOPO30 DEM into MSTS using Microdem and Demex for Australian locations and even try the Andes in South America with no problems.Microdem imports GTOPO30 and changes it to a DEM file, which you then export as a ASCII UTM XYZ file.Using this file you then run Demex which converts the tiles.The Great Dividing Range around Mt Kosciusko, went for miles north and south the height was about 800 meters for the tiles that were there. The Andes tiles were 3800 meters. I placed some track near the 800 meters at the foot them. To get the track to the top will be a challage.GTOPO30 cover the whole world, but the files are big, about 9 meg compress for Eastern Australia, other 9 for Western Australia, India and tne Himalaya Mountains are 19 Meg.Goto this address http://www.visualizationsoftware.com/3dem/downloads.htmlScroll down to
Digital Elevation Model and Overlay LinksAnd find
US Geological Survey 1 Km GTOPO30 Digital Elevation Models (Entire World)
or
NOAA 1 Km GLOBE Digital Elevation Models (Entire World) Make sure you have Map Co-ordinate, when you import it into Microdem it will ask for NorthWest corner and SouthEast corner
Therefore making a DEM for the area you want.I made a DEM for most of Victoria, this work well, making a small area might end up being hit and miss. Co-Ordinates matching could be the problem. The DEM were made about 1993.If you surf the net, the true is out there.David. Remove | Alert Edit | Reply | Reply With Quote | Top
zorcan (113 posts)
Jan-23-02, 09:25 AM (EST) 6. "RE: Fix for DEMEX / TSTF in Australia ?" The problem is not related to the southern Hemisphere, but to a zone which runs east from the western part of Australia to the International date line - so some parts of OZ are ok, as is Southern America. This zone embraces both hemispheres and includes the "far east" (Japan etc.).Once I had worked out the solution (for use within TSTF), I posted it in this forum, so I'm sure that the next rev. of DEM-EX will not pose this problem. Remove | Alert Edit | Reply | Reply With Quote | Top
JohnCS (254 posts)
Jan-23-02, 10:23 PM (EST) 7. "RE: Fix for DEMEX / TSTF in Australia ?" It is quite probable that the current DEMEX does work in australia now. As I stated elsewhere Microdem did not output the proper UTM coordinates in that area. Dr. Guth has fixed that Microdem problem now, though I haven't tested Australia again yet. Remove | Alert Edit | Reply | Reply With Quote | Top
zorcan (113 posts)
Jan-24-02, 04:25 AM (EST) 8. "RE: Fix for DEMEX / TSTF in Australia ?" I was not aware of a problem with Microdem output for Australia. TSTF was not capable of importing xyz files at the time I tackled the tile name issue.For me, it was purely an issue with the Goode tile name extraction algorithm. Remove | Alert Edit | Reply | Reply With Quote | Top

Lock | Archive | Remove

Lobby | Topics | Previous Topic | Next Topic

Restored from the Train-Sim.Com archive, captured January 24, 2002. About this archive.