Internship Blog Post 03

Part One: April 15 2015

KMZ Files

I mentioned in the last post the problem that conveying time represented in the map. I became somewhat aware that it was necessary to time stamp each coordinate in a Google Maps path, however then I was unsure how to control or manipulate the time or coordinates, would I need to build a control panel or time slider like the ones demonstrated in previous map examples, the NYC taxi or fan-made GOT map?

David Brown, who is an academic in Trinity and worked on the Down Survey maps, got in touch to turn me onto KML files, and how they could be used to capture time in maps. KML stands for Keyhole Markup Language; an XML-based file format, KML are used in Google Maps and Google Earth to display information on a map. This was something I hadn’t considered before, creating individual files that could be hosted on software or sites like Google Earth and Google Maps. They are also a convenient way to save maps from Google Earth and load them onto Google Maps, or the other way round.

KML FILE breakdown

Based on the breakdown of KML files below you can see an Overlay and a TimePrimitive heading, both which directly relate to my project. As part of the TimePrimitive heading there is the TimeSpan and TimeStamp markers. TimeSpan relates to the length of time that something occurs for, and would not be useful for this project. TimeStamp enables you to specify at what time something occurs, for example when a marker is passing a point. From this it was possible to give a journey a time and duration, by connecting each latlng coordinate with an individual time stamp in 10-second increments. It will be possible further on in the project to increase or shorten the length of each time stamp, to reflect speed or for how long the ambulance was stationary at one location.

Below is a screenshot of the KML file’s code, it’s extremely simple compared to the Google Maps JavaScript code.

KML FILE EXAMPLE

At the top of the code is the XML and KML heading, then you specify folder and place mark. The “” tags relate to time stamps, they’re in chronological order with the order corresponding to that of the coordinates below. I decided to make the time stamp as accurate as possible, here’s an example:

1916-04-24T12:05:10Z

1916-04-24T12:05:20Z

1916-04-24T12:05:30Z

1916-04-24T12:05:40Z

These relate directly to the following coordinates, in order of longitude, latitude, and altitude (0 meaning the coordinates are stamped to the map or sea level):

(-6.254590549792401, 53.34519527348283, 0)

(-6.255135474147171, 53.34527018484295, 0)

(-6.255107525632838, 53.3467573947477, 0)

(-6.254935042057007, 53.34816070446004, 0)

The element relates to tracks in Google Earth, which are exactly like paths or routes in Google Maps. This enables the movement of a marker between the coordinates, creating movement. It is also possible to have multiple tracks with the “” element, useful for journeys occurring simultaneously, like in the ambulance log.

The time-stamped track can then be manipulated by the time control panel available in Google Earth. Here you can speed up, slow down, loop, pause, skip backwards or forwards along the route. This is far more functionality available than the NYC taxi visualisation, which was limited to speeding up and slowing down the visualisation, not starting and stopping it or skipping forwards and back. It is also possible to drag the time slider forwards and back, which moves the ambulance marker along its route in the real map. Below is a close-up screenshot of the time control panel available with Google Earth.

Time Controls

Every file I make in Google Earth can be saved as a KML file (KMZ is the file in compressed form). These can then be imported to Google My Maps for example, however there is a compatibility issue, Google Maps displaying coordinates and markers but not the image overlay or the tracks.

Google Earth Map Overlay

Overlaying maps and images is also made much easier with Google Earth, not requiring JavaScript knowledge or even KML. Instead there is an image overlay button present in the Google Earth toolbar.

Overlaying the very large, detailed maps from DRIS and the Glucksman library was made very simple with Google Earth. However one of the complications with the overlay was that the maps used were really large, they actually posed a bit of difficulty for DRIS in getting them digitised, the larger camera owned by DRIS being repaired in Sweden, adding to delays. Once I received the digitised maps, the quality of them was really unbelievable. Below is a screenshot of Trinity College, complete with trees in the quad, of really excellent quality.

Map Detail

However what quickly became clear was that I had underestimated how many maps would be needed. Below is a screenshot of the 25-inch map of Dublin, tiles number 7 and 11. The markers signify locations the ambulance travelled to that were not on those digitised maps, and represent an oversight on my part. It should still be pointed out that this doesn’t do justice to just how many calls are still contained within those two maps. I then had to pay another visit to Paul Ferguson of the Glucksman Map Library, and he very helpfully recommended the four maps on either side of these maps shown here.

I will now include a series of details of maps, one where I came in just within the map’s bounds, one where I landed just outside it, and one where I was way off the mark (adding insult to injury this was the very first route on the log book).

Map Detail 06

Map Detail 07

Map Detail 08

Also now would be a good time to talk about the larger six-inch map of Dublin, which does carry all of the above locations, however due to its size and lack of detail is not desirable for the project, at least very close up. The project would require zooming from the close-up 25-inch map out to the far more broad six-inch map, the latter being called a “super overlay”.

Map Detail 03

Interestingly one of the main events in Easter 1916 was the volunteer attack on the Magazine Fort in Phoenix Park, which at the time was full of ammunition that the volunteers tried to gain access to but failed, instead setting it on fire. The Ordinance Survey map of Phoenix Park carries a big blank for the Magazine Fort. At first we were worried this area was detailed in another map to the west, but Paul eventually found the location. He then explained tha the cartographers would have been prohibited from capturing that area of the Phoenix Park, in case of a military attack not to give information away as to the fort’s set-up. This could potentially be an example of maps influencing history, after all the volunteers were unsuccessful on their attack, maybe like me they accessed the Ordinance Survey maps, only to be met with a black space were the Magazine Fortress was.

Map Detail 04

Map Detail 05

I have also included some screenshots below of where the historical overlay matches perfectly with the current streetscape, and where it doesn’t correspond 100%. Unlike Google Maps and the examples of dodgy alignment mentioned in the last blog, Google Earth allows users to pull, stretch and manipulate the image, resulting in greatly increased accuracy.

Another complication which arose that I hadn’t backed on was once I had successfully aligned the map overlay and created a functioning track or path from Tara Street Station to 72 Cadogan Road, a private residence, that there is quite a big departure between the roads now and from 1916. For example see below, the red path curves around the Bus Aras building and corresponds to the Dublin roads of today. But as you can see, this would not be possible in 1916, there was a wall in the way.

Map Detail 10

This is easily fixed however. Once the 1916 map is correctly aligned to the Google Earth map, it is just a matter of using the historic overlay to navigate the streets rather than the more modern map.

Mentioning the additional 25-inch maps I put an order in with DRIS, they should arrive tomorrow Thursday 15 April, and I will be able to expand the map. As it stands however I’m very pleased with the functionality of the map. What remains is for me to complete all these ambulance journeys; there are circa 600 reported calls in the space of six days. This is still a lot to animate, but not all calls were answered, particularly as fighting intensified – I would speculate there were 300-400 calls that were responded to. Next I must investigate how to embed the map on a website, link it to the database of firemen bios that Finola Frawley at Dublin City Library has researched, and generally edit and troubleshoot the map before presenting it as a finished product.

Part Two: 8 May 2015

I am just after submitting the in-depth Internship Whitepaper today, in addition to the internship presentation two weeks ago. However a completed internship project is far away. It is still necessary to visualise many of the 400+ journeys that took place over Easter Week 1916 that are noted in the ambulance log book, as well as publish the animated map online, which has recently hit a snag. But first allow me to mention the gains I’ve made in the past three weeks.

I showed in the first part of this blog post how several of the ambulance routes would have taken the ambulances beyond the bounds of the two overlaid maps. Since then I have received high-resolution photographs of the four maps that they border on. Having quickly edited them I overlaid these maps to ensure they contained these points, and I include a screenshot below. 

6 Panels Edited

As can be seen the six maps in total clearly contain all of the outside points. On close examination you may see that white lines appear at the edges of the map panel on the bottom-left hand side. This owes to the fact that the map image is not perfectly square when the map was originally photographed. It is actually very difficult to have the image exactly aligned for DRIS’s cameras, particularly given the massive size of the maps themselves. This results in borders that bend, which makes cropping out the extraneous blank spaces of the map extremely difficult. Adjusting the image and flipping it .05 degrees to the left removes these white spaces on the image. But because they are now not perfectly square, Google Earth automatically produces these white spaces to fill them in the gaps. How this can be solved is simply to crop inside the map image to produce a square, which is easily done.

Next before signing off comes the question of how the map visualisation is to be published. It is the intention of Dr Mary Clarke to have the visualisations displayed on the Dublin City Library website, useful in particular for the upcoming 1916 centenary. But on investigating once the Google Earth map is complete how to then publish it on a website, I received some disappointing news. Google had announced in late 2014 that they would be deprecating the Google Earth Plugin API that is used to publish the maps online as of 31 December 2015. This would be ok for a further 7 months, by which time I’d have graduated and moved on, leaving the problem behind for someone else. But apart from forming a blemish on my CV, I felt I could not leave in the lurch all of the helpful and enthusiastic people who helped me get this far, and it would be a criminal waste of resources for this really rare dataset, the ambulance log book.

Below is a screenshot of a chart detailing Google Earth’s flagging user numbers:

Google Earth Users

The reason Google would be deprecating the plugin is because it is built along an old framework that poses security risks for Google Chrome users. Another reason why they didn’t think to update the Google Earth API could be because it’s been largely supplanted by Google Maps, being perfectly fit for my project’s purposes however. This is a costly reminder though of internet tools’ forced obsolescence, and how neglecting to perform thorough research before a project, or assuming that a software will continue on to infinity, can threaten to sink a project.

This movement from Google Maps to Google Earth meant it might be possible to save the completed maps on Google Earth to a KML file, and import that to Google My Maps. This was possible, however Google My Maps will not support the features in Earth I was thrilled to finally achieve, like time stamps, animated markers, or tracks. So Google My Maps wasn’t tenable.

However there were other plugin options for the Google Earth map. One was the Netscape Plugin API (NPAPI), which although already being phased out, Google assures us will remain in use until the end of 2016, which strictly speaking would cover the 1916 centenary, but is not very satisfactory either. There are several different third-party APIs that may be of help as well.

As I write the future of my map visualisation is mired in uncertainty and doubt. I have however contacted one or two lecturers who know substantially more about computers than I do, and whom I expect should be able to dredge me out of this mess.

So it’s tentatively that I sign off.

Thanks to Mary Clarke, Las Fallon, Finola Frawley, David Brown, Mark Sweetnam, and Sarah Conroy.

Bibliography:

“Google Earth API (Deprecated)”, Google Developer, 12 December 2014:

https://developers.google.com/earth/

“The Google Maps Engine Deprecation Timeline and Some Alternatives” , GISUser, 3 February 2015:

The Google Maps Engine Deprecation Timeline and Some Alternatives

“Saying Goodbye to Our Old Friend NPAPI”, Chromium Blog, 23 September 2013:

http://blog.chromium.org/2013/09/saying-goodbye-to-our-old-friend-npapi.html

“The Final Countdown for NPAPI”, Chromium Blog, 24 November 2014:

http://blog.chromium.org/2014/11/the-final-countdown-for-npapi.html

Advertisements