Elvas Tower: KML2Marker - Elvas Tower

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

KML2Marker Rate Topic: -----

#1 User is offline   eric from trainsim 

  • Waste Disposal Engineer
  • Group: Private - Open Rails Developer
  • Posts: 1,566
  • Joined: 30-October 10
  • Gender:Male
  • Simulator:ORTS
  • Country:

Posted 09 April 2013 - 08:10 AM

File Name: KML2Marker
File Submitter: eolesen
File Submitted: 09 Apr 2013
File Category: Computer Utilities

KML2Marker is a new variation on an old theme... reading in a KML file from Google Earth, and converting it to markers.

Pushpins, line measures, paths, and polygons are all supported.

  • Pushpins will generate one marker per item.
  • Line measures will generate one marker per endpoint.
  • Paths and polygons will generate one marker per endpoint and for each interim point.


Route_Riter has long supported pushpins and line measures, but has not correctly supported paths, and is reportedly no longer in development.

Please contact me by PM here or on TrainSim if you have questions or bug reports.

Apr 2013, by Eric Olesen

Click here to download this file

#2 User is offline   eric from trainsim 

  • Waste Disposal Engineer
  • Group: Private - Open Rails Developer
  • Posts: 1,566
  • Joined: 30-October 10
  • Gender:Male
  • Simulator:ORTS
  • Country:

Posted 09 April 2013 - 08:43 AM

Anyone who has created markers in Google Earth or another tool one at a time will tell you it's painful and tedious.

Using paths in GE, you can put down 40 or 50 markers rather quickly. And even more if you really want to...

The orange line below was done in about two minutes:
https://lh3.googleusercontent.com/-mXLRc08VGiQ/UWQ81f6Rb8I/AAAAAAAASl8/pcdaI42wDu8/s720/capture__112060.jpg

When you create or edit the path, you can see the spacing of the midpoints. Here's the beginning of my edit session:
https://lh5.googleusercontent.com/-3P66FTc_49I/UWQ80YDLfyI/AAAAAAAASlk/PcREhvN9TEY/s800/capture__112058.jpg

Opening up in the RE, I've got a great set of markers to follow for the curves (although I should have used a shorter name):
https://lh3.googleusercontent.com/-zt3-ItQEacc/UWQ839CrixI/AAAAAAAASmo/ymiXajvY_DI/s576/capture__112066.jpg

Fortunately, the terrain really does match GE, as is evident by the fill extending into this particular river bottom:
https://lh6.googleusercontent.com/-oURO8p4P5mI/UWQ85VsUvjI/AAAAAAAASm8/cBPe9aVcVHQ/s576/capture__112069.jpg

In addition to the obvious time saving on data entry, using paths also makes it easier to move items around in folders. Moving 40 endpoints can be a pain. Moving a path isn't.

#3 User is offline   eric from trainsim 

  • Waste Disposal Engineer
  • Group: Private - Open Rails Developer
  • Posts: 1,566
  • Joined: 30-October 10
  • Gender:Male
  • Simulator:ORTS
  • Country:

Posted 09 April 2013 - 08:45 AM

Paths can be used in a lot of different ways....

Building outlines... You only really need three corners to set a building, but feel free to add as many as you need:
https://lh3.googleusercontent.com/-_K1_oxa3fIs/UWQ_Re5leRI/AAAAAAAASng/BOWWd6H2p7Y/s800/capture__112073.jpg

https://lh5.googleusercontent.com/-FffQzlKKe3I/UWQ_PwFlViI/AAAAAAAASnM/FwRm-4Qs_JQ/s576/capture__112074.jpg

Here, I've also used a path to mark the edge of a subdivision. 30 seconds of work:
https://lh6.googleusercontent.com/-u0NC3xiBpLI/UWQ_Q9LObbI/AAAAAAAASnU/GYhkzkxuTz8/s640/capture__112072.jpg

https://lh5.googleusercontent.com/-nAirOcei4u8/UWQ_RoTasDI/AAAAAAAASnk/aJWiPSB5VdI/s576/capture__112075.jpg


A little longer to create these -- the edge of a dry riverbed:
https://lh4.googleusercontent.com/-CTcuhOxVQO8/UWRDA7P0RVI/AAAAAAAASoU/NhLv1584O5E/s720/capture__112076.jpg

https://lh6.googleusercontent.com/-cZXVSHm2goU/UWRAbgjHD0I/AAAAAAAASns/HMbJkUkCqb4/s576/capture__112077.jpg



And yes, the markers behave quite nicely in Mosaic:
https://lh5.googleusercontent.com/-htimkuNWpdM/UWRBppRWzBI/AAAAAAAASn8/I0miqTpLr6M/s800/capture__112078.jpg


Routebuilding **can** be fun when you make some of the more tedious activities easier. And for me, markers have always been a chore. This will cut down the time I spend doing them by more than half.

#4 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,329
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 09 April 2013 - 08:47 AM

Q: Do the markers project into MSTS using the Goode-Homosline method, something "normal", and can you choose? Source code anywhere?

#5 User is offline   eric from trainsim 

  • Waste Disposal Engineer
  • Group: Private - Open Rails Developer
  • Posts: 1,566
  • Joined: 30-October 10
  • Gender:Male
  • Simulator:ORTS
  • Country:

Posted 11 April 2013 - 10:13 AM

Dave, are you looking for my source code? It's not rocket science to parse out a file... :) Or are you referring to the logic on plotting markers?

GE uses WGS84 datum, and DEM uses NAD83, which are within a few cm of each other depending on the age of the DEM.

#6 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,329
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 11 April 2013 - 11:17 AM

What I was curious about is the reconciliation between most routes use of the Goode-Homosoline projection and what happens w/ marker generation. With Mosaic generated markers the result conforms to the Goode-Homosoline projection. This is evident when laying out a series of markers on two roads that cross at right angles: right angles in USA Photomaps but non-right angles in MSTS RE, with the difference equal to the Goode-Homosoline skew.

So re-phrasing my original question, when you lay out right angle lines in GE, do you get right angled markers in RE? I'm looking for a marker generation program that retains the right angles (unlike the DEMEX function).

#7 Inactive_James Addington_*

  • Group: Status: Passengers (Obsolete)

Posted 03 July 2013 - 08:44 AM

I wood like to know were wood the marker file go in ts2012. I new this rout building.

#8 User is offline   That Genset Foamer 

  • Superintendant
  • Group: Status: Inactive
  • Posts: 1,459
  • Joined: 14-September 12
  • Gender:Male
  • Location:Somewhere on the ATSF 4th District
  • Simulator:OpenRails
  • Country:

Posted 23 November 2013 - 05:35 PM

I'm having an issue getting the program to work. I try to get it to parse a KML file from Google Maps, but the JIT debugger window pops up with "index was out of bounds of the array" or something like that, and the program crashes. Any info on what would cause this?

#9 User is offline   eric from trainsim 

  • Waste Disposal Engineer
  • Group: Private - Open Rails Developer
  • Posts: 1,566
  • Joined: 30-October 10
  • Gender:Male
  • Simulator:ORTS
  • Country:

Posted 25 November 2013 - 08:27 AM

Can you post the KML file so I can run it in the debugger?

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users