Importing objects at specific coordinates?

martinvk

since 10 Aug 2002
Getting the latitude and longitude coordinates of a location and displaying it is easy to do. Now is there an easy way to import objects and place them at specific coordinates?

Given a file with labels and coordinates, what do I do to get them into a map?

From Google Earth, I can get the coordinates of key points in a route and would like to quickly create markers in a map using an object that can display a label. So far I have been doing this by hand, placing each one, one at a time. With many markers, this is a rather tedious job.

Looking at the obs file in a route, it would appear that a way needs to be found to edit it since my existing markers' labels are recognizable in there. Has anyone tried this?
 
I was originally thinking you wanted to do it somehow in Surveyor or thru the game interface - that's not possible.

It could be done with 3rd party programs outside Trainz but I don't know of any that will do what you want here. I work mainly with the gnd and trk files. TransDem I believe also writes things into the obs files to a limited entent but not as a general editor like you'd need.

You need to get the map file formats and then write a program to edit it in a user friendly manner. I'd suggest, as I always do in these cases, that you post a request to the help desk explaining what you want to do and why you need the formats to do it. In years past you had to sign an nda but that policy has changed afaik.

I write trk files to get splines into the game without laying a single piece by hand. My current versions don't have the latest format for the obs file and my requests to Auran have be answered with some not now we're busy try us again later replies. I can always resort to the hex editor again. Actually since I can read the obs file now for the most part it's not all that bad. But still requires a lot of making changes in the game and then reading the file to see what changed. For reading files you can generally get enough of the format to do what you need as you often don't need to know it all. But for writing them it's not always easy to get everything 100% correct and that can be a problem with unintended side effects. It's best to get the official format version if at all possible.

Bob Pearson
 
Thanks for your insight.

One reason for my renewed interest in this subject was because of my reading the latest RSDevTools documentation. In one of the documents they describe how you can extract latitude and longitude data from Google Earth kml files and then import the results into one of their maps. Even though the more I read about RS, the less I'm attracted, this one item caught my eye since I'm already doing this, except all by hand, in my route.

Now to see it I can interest Auran's Helpdesk in this subject.
 
RS uses a well known map projection: Universal Transverse Mercator (UTM). This converts geographic coordinates, based on the WGS84 geodetic datum to well defined planar coordinates (and vice versa).

Nobody seems to know which projection is the built-in one in Trainz. I guess it's rather basic as it probably wasn't intended for mapping real world locations. I didn't investigate.

In TransDEM I was already using UTM. Back in spring 2001, when I started work on my first railway simulation related tool, I thought UTM is the most suitable map projection for planar terrain models.

Now, with the combination of TransDEM and Trainz, you have UTM in Trainz and can import locations: ground textures, polylines or map tiles.

BTW, freeware tool MapMaker is also based on UTM.

So, it's all there.
 
Back
Top