RSS

Geographic Browser Update

The geographic browser function I’ve talked about elsewhere is coming along nicely. Based on visitor feedback, I want to provide additional information about the markers used on the maps. The red and green markers are pretty much self explanatory, but the blue ones have caused some confusion.

First of all, it is important to note that the markers on the geographic browser maps do not reflect a precise location for a locomotive. They are intended to show general locale, like city, state or village. If you zoom in far enough, you may notice this. The blue markers, designating multiple locomotives were added to reduce clutter on the display and to provide more information. Let’s consider Galveston, TX. The blue marker there replaces three green markers, all of which were in precisely the same location. Without the blue marker, you’d only see the information for whichever locomotive’s marker ended up on the top of the pile. Instead we have a blue marker, which, when clicked, gives you the following display:

Pretty simple, really. The top line of the little pop up window identifies the location within the city, the second line lists the city, state and country. What apparently confused some folk visiting the site is when you have a blue marker in a city like San Antonio, where there are multiple locations within the city which have locomotives. Then you get a display that looks like this:

In this case, the top line(s) look much different. Each of the places, separated by the / character have locomotives, all within the city of San Antonio.

These information windows are generated by a computer program and stored pending someone clicking on the appropriate marker. The program isn’t particularly bright, and doesn’t make value judgments about what it includes. If, during data entry those many years ago, I listed one locomotive as being at the Harlequin Railroad in Left Overshoe, Nebraska and another at the Harlequin Railway in Left Overshoe, Nebraska then the program would list both locations on the top line.

Many more features are planned (and being worked on). One will make the locomotives in those pop up windows clickable to get a screen with everything we know about the locomotive.

 
Leave a comment

Posted by on August 8, 2020 in Website

 

Website Updates 08-02-2020

Still working on the Geographic Browser. Over the last two days I’ve improved the regional/state/province borders for Spain, Germany and Canada. This was somewhat time consuming, but they certainly look nicer.

Secondarily I’ve continued to work on the Admin interface tools for the Geographic Browser. I’m getting close to finishing the first (of many).

 
Leave a comment

Posted by on August 2, 2020 in Website

 

Geographic Browser

Our new Geographic Browser has been deployed for the whole world. And we really, really hope you’ll enjoy it. It currently exists in a fairly basic form. Many features are planned to be added to this new system. So let me explain what’s available.

The Browse button on the front page of the site is the gateway to the Geographic Browser. You can pick a continent, a country, and even a state, region or province. When you do, you’ll see a display that looks like this at the top:

Display for the State of Minnesota, USA

Anywhere that you see a map or a flag in the upper left corner of a locomotive list, as above, it is clickable. Clicking it will get you a display that looks like this:

Locomotive in Minnesota

The markers indicate the locations of locomotives within the state or locale you’ve selected. Green markers indicate locomotives where we have sufficiently accurate location data to generate a map to the locomotive’s precise location. Red markers are used for locomotives where we know the location loosely (no more precisely than the city). Blue markers are an attempt to reduce the amount of clutter on the map. If you hover your mouse over a green or red marker, a flag will appear identifying the locomotive represented by the marker. For blue markers, if you’ll click the blue marker you’ll get a pop up window listing the locomotives at that location.

All About Borders

These maps are drawn by programmatic calls to the Google Maps API, as are the markers and country and regional borders. When I began this project, I hadn’t given a great deal of (or any) thought to country and regional borders. I assumed that they would be a part of any map drawn with the API, but they aren’t. And the API isn’t consistent about it. Generally country borders are visible at some zoom settings and faint or non-existent at others. Provincial, state and regional borders simply aren’t directly available.

There is a solution, of course. The programmer creating a page containing a map can add layers of information to a map. The borders you see around states, provinces and countries are created in this way. There is a programming language called KML (or Keyhole Markup Language) that can be used to draw the borders of almost anything.

We generated the KML files for each locale by extracting data from vastly more complex and comprehensive KML files available from gadm.org. There are several countries for which that approach wasn’t possible, and they will remain borderless or display a crude blue border for the near future was we work on fixing this problem in our data.

Multiple (or Blue Markers)

You’ve doubtless noticed that if you mouseover a green or red marker you get a flag that identifies the locomotive, and if you click on those markers, you get more information. The problem we’re trying to solve with the blue markers is this: If there are 20 locomotives in Left Overshoe, Nebraska, you’ll only see one marker, the last one created, as the other 19 are stacked beneath it, and cannot be separated. Thus was born the Multiple Marker. If you click a blue marker, you’ll get a list of every locomotive in that particular location. Not a perfect solution, I guess, but it’ll have to do until I come up with a better one.

And now for the bad news: I’ve only done the multiple markers for the 50 states, the Canadian provinces and about two dozen other countries. It is a clumsy, manual process. I am writing a tool for me (and the other editors) to use that does a reasonable job of automating this process.

The Problem of Strays

And what, you may ask, is a stray? This is a problem which I discovered after I started putting borders around things. A stray is a locomotive whose record says that it somewhere, and its stored latitude/longitude say that it some where else. You can see an example of this problem by going to the following URL: https://www.steamlocomotive.info/locomap.cfm?locale=Novosibirsk&ucountry=Russia

There you will see the Novosibirsk Oblast of Russia, and a bunch of little red markers. Now zoom out, way, way out. And you’ll see that there are 3 locomotives that are identified as being in Novosibirsk (go ahead, click the markers, I’ll wait). But they are located elsewhere by latitude/longitude. One or the other is wrong, and somebody (me, I guess) will have to sit down and clean up this mess.

 
Leave a comment

Posted by on July 29, 2020 in Website

 

Website Update 07-02-2020

I have begun work on a new feature for the website that I’ve been thinking about for quite some time. Initially, it will be deployed in the United States only, but will gradually be spread to the rest of the world.

If you use the Browse button from the front page, select North America and then the United States, you can then pick any US state. In the upper left corner of the list of locomotives in that state you’ll see a little map of the state. For years, that has been a decoration, only. I thought it looked nice. Now, it actually links to something. If you click it now, you’ll get a large map of the state you’ve selected. In another day or so that map will be populated with markers pointing to each locomotive in that state.

I’ll talk more about it as I get some of the features finished.

 
Leave a comment

Posted by on July 2, 2020 in Website

 

Feats of the Immortal Heroes

Copyright © Parovoz.com

This locomotive, located in a World War II Memorial Park in Odessa, Ukraine says “Feats of the Immortal Heroes” on its side. The blue label says:

Service Registry of Steam Locomotive Ov No. 3818

1905 – Constructed by the Sormovsky Factory

1906 – China-Eastern Railroad

1908 – 1927 Central Asian Railroad

August 15th, 1973 – Placed by the workers of the Odessa Sorting Depot.

 
1 Comment

Posted by on June 30, 2020 in Interesting Locomotives

 

Website Update 06-29-2020

Finished the remainder of the code for the mapping module, and am quite pleased with it. Localization works nicely. Made some enhancements to the Change logging stuff, and fixed a couple of things I missed on the last pass through.

Debating what to tackle next.

As always the Change Report is available below:

Website Change Report for 06-29-2020

 
Leave a comment

Posted by on June 29, 2020 in Website

 

Website Update 06-28-2020

It’s hard to believe that the end of June is already upon us. Today, on the programming front, I resolved several issues surrounding the “localization” issue discussed elsewhere and am almost finished with it. I should be able to move on to other things tomorrow.

Steve Frost, our European editor contributed information and photos regarding several locomotives in the UK today, and I did some research and updated records (and photos) for a couple of locomotives in Canada.

As always, the daily change report is available from the front page of the site, or from the link below:

Change Report for 06-28-2020

 
Leave a comment

Posted by on June 28, 2020 in Website

 

Website Update 06-27-2020

No cute graphics today. I awoke this morning somewhat unmotivated and did some content research for Belgium over a couple of hours. Then I fixed a couple of minor issues in the Change Report/What’s New code.

I’ve now returned to the map subsystem localization issue and am making good progress. I’ll continue this, this evening.

A number of changes to the database, including the addition of previously unknown locomotives occurred today. As always, the daily change report is available below:

Daily Change Report for 06-27-2020

 
Leave a comment

Posted by on June 27, 2020 in Website

 

Happy Results!

This morning as I began to look at the “localization” problem that affected our ability to present a nice “mapping” experience, I was confronted with 2750 locomotives with faulty localization data, 1720 where localization had failed and another 1030 where localization had never been attempted.

The utility that performs the localization task was rewritten. And now we are down to 296 locomotives with faulty localization data, and we have a good idea why, for each one. So yes. Happy. I am happy. Pikachu is happy. Progress is being made.

(I put Pikachu over there for my granddaughter, just so you know.)

Next task is to provide Editors with a tool to fix failed localization issues.

 
Leave a comment

Posted by on June 26, 2020 in Website

 

Website Update 06-26-2020

Maps and Geocoding and Stuff

The method most commonly used to create a map to a locomotive’s location is called “geocoding”. In brief, we supply you with a map of the general area, you find the locomotive, drop a marker on it and we’re in business.

The problem with this idea, of course, is that we have to have the geographic coordinates (latitude and longitude) of a point somewhere vaguely in the neighborhood of our target locomotive. Usually this point is the “average center” of a geographic object, like a city. With 21,516 locomotives in our database, I can pretty well assure you that no one went through that list, found the middle of each city containing a locomotive, and then entered that into the locomotive’s record as its “localization coordinates”.

Rather a utility program was written to use the Google Maps Geocoding API to obtain these coordinates and enter them into the database. Now API is a term that is often bandied about, but seldom explained. It stands for Application Programming Interface. And what it means in the simplest possible terms is that a series of “functions” have been written to allow my computer to chat politely with your computer.

So when I returned to attack various issues with the website I became aware that there were 1720 locomotives (7.99%) in the database for which localization had failed and another 1030 (4.78%) for which localization had never been attempted. So naturally I brought out that little utility program I had written and used earlier and told it to go to work. And the thing failed on every single one of the 2750 locomotives it looked at. What?!? It used to work just fine. Why not now?

Several days of dread and avoidance ensued. I didn’t want to look at it, didn’t want to debug it. And finally I did. It took an hour to discover that Google had changed the API, so an additional parameter was required. And I fixed it, tested it and sat back grinning.

Today’s Programming Plans

  • I’m going to modify the localization utility so that when it encounters a location it cannot geocode it will log the location, the locomotive’s id and the failure code, so that I can investigate why this happened, and if necessary manually correct it.
  • I’m going to modify the admin routine that allows an editor to move a locomotive from one place to another, so that once the locomotive has been placed in its new location, localization is performed to make mapping possible.
  • Will also add a menu item that allows an editor to manually localize a locomotive.

With all that having been said, the daily change report is, of course, available at:

Daily Change Report 06-26-2020

 
Leave a comment

Posted by on June 26, 2020 in Website