<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WWII Archives - ClickedyClick</title>
	<atom:link href="https://gergely.imreh.net/blog/tag/wwii/feed/" rel="self" type="application/rss+xml" />
	<link>https://gergely.imreh.net/blog/tag/wwii/</link>
	<description>Life in real, complex and digital.</description>
	<lastBuildDate>Sun, 08 Nov 2015 07:42:34 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>Taiwan WWII Map Overlays</title>
		<link>https://gergely.imreh.net/blog/2015/11/taiwan-wwii-map-overlays/</link>
					<comments>https://gergely.imreh.net/blog/2015/11/taiwan-wwii-map-overlays/#comments</comments>
		
		<dc:creator><![CDATA[Gergely Imreh]]></dc:creator>
		<pubDate>Mon, 02 Nov 2015 13:47:43 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Taiwan]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[history]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[maps]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[WWII]]></category>
		<guid isPermaLink="false">https://gergely.imreh.net/blog/?p=2102</guid>

					<description><![CDATA[<p>A while ago I came across the Formosa (Taiwan) City Plans, U.S. Army Map Service, 1944-1945 collection, in the Perry-Castañeda Library Map Collection of the University of Texas in Austin. I&#8217;m a sucker for maps, enjoy learning about history a lot, and I have a lot of interest in my current home, Taiwan &#8211; so you can call this a [&#8230;]</p>
<p>The post <a href="https://gergely.imreh.net/blog/2015/11/taiwan-wwii-map-overlays/">Taiwan WWII Map Overlays</a> appeared first on <a href="https://gergely.imreh.net/blog">ClickedyClick</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>A while ago I came across the <a href="https://www.lib.utexas.edu/maps/ams/formosa_city_plans/">Formosa (Taiwan) City Plans, U.S. Army Map Service, 1944-1945 collection</a>, in the <a href="https://www.lib.utexas.edu/maps/">Perry-Castañeda Library Map Collection</a> of the University of Texas in Austin. I&#8217;m a sucker for maps, enjoy learning about history a lot, and I have a lot of interest in my current home, Taiwan &#8211; so you can call this a magic mix of cool stuff.</p>
<p>There are 26 maps in the collection, made by the US Army by flying over different parts of the island, and mostly I guess stitching together aerial photographs. The maps themselves were not that easy check in an image viewer, since there&#8217;s no context, zoom is clumsy, and have no idea where about half the places should be located. Instead, I thought it would be great to have them as an overlay on top of current maps and satellite imagery on Google Maps.</p>
<p>The result is <a href="https://imrehg.github.io/taiwanmap/">Taiwan City Maps overlays</a>, which does exactly that. <em>Feel free to click the link and explore right now!</em> In the rest of this post, I try to first show how that page was made, and also some history lessons I gained by making it.</p>
<p><span id="more-2102"></span></p>
<h2>How it was made</h2>
<p>The <a href="https://developers.google.com/maps/documentation/javascript/examples/groundoverlay-simple">Google Maps Ground Overlay API</a> does exactly what I needed, so can&#8217;t claim much (almost any) innovation in the page, though I stumbled on it after a few other &#8220;Overlays&#8221;, as Google Maps has a couple, all working slightly differently.</p>
<p>Ground Overlay basically takes the following parameters:</p>
<ul>
<li>the map&#8217;s center,</li>
<li>zoom level,</li>
<li>an image,</li>
<li>the image&#8217;s N/E/W/S bounds in geographical coordinates.</li>
<li>whether to show satellite or maps view underneath</li>
</ul>
<p>Even cooler, the opacity of the image can be adjusted, so the overlay and the base layer can be viewed together much easier!</p>
<p>In that list above, the trickiest part is of course figuring out the boundaries of the image &#8211; basically the way to overlay them &#8211; for multiple reasons. First, all the maps have borders with information, titles, legend, and so on. Here below is the Taipei city plan from 1944. I can&#8217;t really tell where the corner of the image should be geographically, if there&#8217;s nothing to compare to.</p>
<figure id="attachment_2109" aria-describedby="caption-attachment-2109" style="width: 600px" class="wp-caption aligncenter"><a href="https://imrehg.github.io/taiwanmap/maps/txu-oclc-6565483.jpg"><img fetchpriority="high" decoding="async" class="wp-image-2109 size-full" src="https://gergely.imreh.net/blog/wp-content/uploads/2015/11/Taipei_Small-min.jpg" alt="Taipei / Taihoku city plan" width="600" height="490" srcset="https://gergely.imreh.net/blog/wp-content/uploads/2015/11/Taipei_Small-min.jpg 600w, https://gergely.imreh.net/blog/wp-content/uploads/2015/11/Taipei_Small-min-500x408.jpg 500w" sizes="(max-width: 600px) 100vw, 600px" /></a><figcaption id="caption-attachment-2109" class="wp-caption-text">Taipei / Taihoku city plan</figcaption></figure>
<p>Then there&#8217;s also the problem of things have changed in the last ~70 years, so a lot of things are different on the maps, if I want to match them up. Lastly, the maps are not perfectly accurate either, they are stitched from multiple photographs of unknown quality.</p>
<p>Been trying to match the maps by hand for a while, and codings some tools to make that process easier &#8211; but it didn&#8217;t really get easier. I needed to get to get around all these issues, and have a reasonable, objectively good fit. Objectivity is a key, and math helps with that. What I ended up with doing a linear fit of geographical and image coordinates.</p>
<ul>
<li>look for landmarks that are reasonably the same back then and now</li>
<li>note their geographical coordinates, and their pixel coordinates on the image</li>
<li>note the image size</li>
<li>finally: run a linear fit that gives back the geographical coordinates of the image edges that would best match the landmark data in both sources</li>
</ul>
<p>In really ugly Python it would be something like this:</p>
<pre class="lang:python">import numpy as np

# # For example the contents of "taoyuanfit.csv":
# # Landmark data: image vertical/horizontal (px), latitude/longitude
# 1677,2861,24.991962,121.322634
# 1597,524,24.992282,121.304856
# 2385,1348,24.986873,121.311122
# 764,1342,24.998116,121.311411
datafile = "taoyuanfit.csv"
points = np.loadtxt(datafile, delimiter=",", comments="#")
imgwidth, imgheight = 3975, 3209

# Points on the image, scaled to range 0 to 1
px, py = points[:, 1]/imgwidth, (imgheight-points[:, 0])/imgheight
# Points on the map
gx, gy = points[:, 3], points[:, 2]
# Do the fitting
lx, ly = np.polyfit(px, gx, 1), np.polyfit(py, gy, 1)

# Fitting parameters give map boundaries, results in this case
west = lx[1]          # 121.300983
east = lx[1] + lx[0]  # 121.331141
north = ly[1]+ly[0]   #  25.003429
south = ly[1]         #  24.981204
</pre>
<p>This is now pretty objective, and then quality of the overlay depends on the quality of the landmarks I find, and the maps that they are on.</p>
<p>The best landmarks I could turn up were notable roundabouts like below&#8230;</p>
<figure id="attachment_2103" aria-describedby="caption-attachment-2103" style="width: 600px" class="wp-caption aligncenter"><a href="https://imrehg.github.io/taiwanmap/taiwanmap.html?location=Tainan#lat=22.992571&amp;lng=120.205386&amp;z=17"><img decoding="async" class="wp-image-2103 size-full" src="https://gergely.imreh.net/blog/wp-content/uploads/2015/11/map_roundabout.gif" alt="Matching roundabouts (Tainan)" width="600" height="400" /></a><figcaption id="caption-attachment-2103" class="wp-caption-text">Matching roundabouts (Tainan, click to go to this section on the map)</figcaption></figure>
<p>&#8230; and recognizable streets and intersections, like below&#8230;</p>
<figure id="attachment_2104" aria-describedby="caption-attachment-2104" style="width: 600px" class="wp-caption aligncenter"><a href="https://imrehg.github.io/taiwanmap/taiwanmap.html?location=Taichung#lat=24.140336&amp;lng=120.680156&amp;z=17"><img decoding="async" class="wp-image-2104 size-full" src="https://gergely.imreh.net/blog/wp-content/uploads/2015/11/map_streets.gif" alt="Matching recognizable streets (Taichung)" width="600" height="400" /></a><figcaption id="caption-attachment-2104" class="wp-caption-text">Matching recognizable streets (Taichung, click to go to this section on the map)</figcaption></figure>
<p>&#8230; but not too small and not too large streets. Large streets have fewer recognizable locations (unless some notable mid-sized street is intersecting with it), and small streets are usually not placed too carefully on the map, so can&#8217;t really trust their positions.</p>
<p>What I couldn&#8217;t trust, though: rivers (they changed a lot), bridges (usually can&#8217;t tell if they are the same bridge in both era, or a new one built close to the no longer there old one, as it is a common practice), coastlines, lakes, large structures.</p>
<p>The minimal number of landmarks needed for a fit (ideally) is just two, and surprisingly, there were a couple maps where I could get along with about three. In most cases, though, I needed at least 4-6 landmarks, and there were some I needed to discard for overall better quality of fit. Some maps show pretty good accuracy, while others (such as e.g. <a href="https://imrehg.github.io/taiwanmap/taiwanmap.html?location=Kaohsiung">Kaohsiung</a>) are quite poor &#8211; compared to today&#8217;s satellite pictures, of course. It&#8217;s all enjoyable, though.</p>
<p>Then added a few more functions to the page, such as changing the opacity, being able to link to the exact location and zoom level I&#8217;m looking at, and some page-load animation (the maps are in the range of 4-10MB, not that quick to load).</p>
<p>The source code for the site is <a href="https://github.com/imrehg/taiwanmap">on Github</a>, and pull requests are accepted, naturally.</p>
<h2>History lessons learned</h2>
<p>I was very interested to note the things that have changed, and things that haven&#8217;t in the decades passed.</p>
<h3>Things that mostly stayed the same</h3>
<p><strong>Schools</strong> are usually at the same location, even stayed the same type (e.g. girls&#8217; high school staying that <a href="https://imrehg.github.io/taiwanmap/taiwanmap.html?location=Changhua#lat=24.081851&amp;lng=120.544232&amp;z=17">in Changhua</a>).</p>
<p><strong>Airports</strong> are usually at the same location (duh!), though usually greatly expanded, while the old runways can be matched to the new ones (<a href="http://localhost:8000/taiwanmap.html?location=Hsinchu#lat=24.819385&amp;lng=120.946305&amp;z=15">like in Hsinchu</a>).</p>
<p><strong>Train stations</strong>, of course, although tracks might change, or entire stations disappear (like <a href="https://imrehg.github.io/taiwanmap/taiwanmap.html?location=Beigang#lat=23.567516&amp;lng=120.296347&amp;z=17">in Beigang</a> or <a href="https://imrehg.github.io/taiwanmap/taiwanmap.html?location=Hualien#lat=23.973977&amp;lng=121.611590&amp;z=17">in Hualien</a>).</p>
<p><strong>Military installations</strong>, which surprised me, can stay the same, looks like the KMT troops just took over the Japanese posts and continued to use them. Some turned into schools, or could disappear too.</p>
<p>Many <strong>roundabouts</strong>, <strong>outlines of city blocks</strong> (like the <a href="https://imrehg.github.io/taiwanmap/taiwanmap.html?location=Taipei#lat=25.035710&amp;lng=121.520802&amp;z=16">CKS Memorial Hall now</a>, or <a href="https://imrehg.github.io/taiwanmap/taiwanmap.html?location=Yilan#lat=24.757393&amp;lng=121.753820&amp;z=16">Yilan&#8217;s city outline</a>), <strong>mountains</strong>, also stayed mostly the same.</p>
<h3>Things that changed a lot</h3>
<p><strong>City areas</strong> changed enormously (duh!), just look at the capital, <a href="https://imrehg.github.io/taiwanmap/taiwanmap.html?location=Taipei">Taipei</a>, the west side stayed mostly the same but built in about twice/three times as big area on the east. Most other cities grown just like that, as it&#8217;s very clear for example <a href="https://imrehg.github.io/taiwanmap/taiwanmap.html?location=Taitung">for Taitung</a>. It&#8217;s no wonder, 5.8 million people on the island in 1940, while above 23 million by now (<a href="https://en.wikipedia.org/wiki/Demographics_of_Taiwan#Population_census">according to Wikipedia</a>). This also brings the changes of a lot of <strong>streets and roads</strong>.</p>
<p>Water is definitely very changeable. <strong>Rivers</strong> got diverted a lot, most notably on the <a href="https://imrehg.github.io/taiwanmap/taiwanmap.html?location=Taipei#lat=25.071025&amp;lng=121.566421&amp;z=14">east side of Taipei </a>(near Neihu and Songshan districts) the Keelung river was straightened up, but the roads can still mirror the old path. Other rivers (or channels?) got covered up, and now only live on as roads &#8211; though I guess they might still flow under our feet (just like <a href="https://en.wikipedia.org/wiki/Fleet_Street">Fleet Street</a>)? Some more dramatic change is an entire <strong>missing island</strong> <a href="https://imrehg.github.io/taiwanmap/taiwanmap.html?location=Danshui#lat=25.165905&amp;lng=121.438357&amp;z=16">in Danshui</a>, I wonder what happened to it? <strong>Lakes</strong> change too, mostly I guess due to development around them (<a href="https://imrehg.github.io/taiwanmap/taiwanmap.html?location=Zuoying#lat=22.684229&amp;lng=120.296463&amp;z=15">like in Zuoying</a>). The <strong>sea shore</strong> is different for the many cities, as probably they were developed and also the shallows were naturally filled by the rivers (<a href="https://imrehg.github.io/taiwanmap/taiwanmap.html?location=Hsinchu#lat=24.816249&amp;lng=120.923389&amp;z=15">like in Hsinchu</a> and <a href="https://imrehg.github.io/taiwanmap/taiwanmap.html?location=Tainan#lat=22.998689&amp;lng=120.199147&amp;z=14">in Tainan</a>). Harbors don&#8217;t stay the same either (<a href="https://imrehg.github.io/taiwanmap/taiwanmap.html?location=Penghu">like in Penghu</a>).</p>
<p>Some landmarks such as <strong>shrines</strong> have changed too. The most notable I could find so far is in Taipei / Yuanshan, where the current <a href="https://en.wikipedia.org/wiki/Grand_Hotel_(Taipei)">Grand Hotel / 圓山大飯店</a> replaced a shrine in 1952 (yellow rooftop on the left below), while the <a href="https://en.wikipedia.org/wiki/National_Revolutionary_Martyrs%27_Shrine">Taipei Martyrs&#8217; Shrine</a> seems to be built on the site of another previous shrine in 1969 (yellow rooftop and cross-shaped grounds on the right below). On the map there&#8217;s another temple-complex looking structure in between them, that&#8217;s now the <a href="https://www.americanclub.org.tw/">Taipei American Club</a> and the <a href="https://en.wikipedia.org/wiki/International_Community_Radio_Taipei">International Community Radio Taipei (ICRT)</a>.</p>
<figure id="attachment_2140" aria-describedby="caption-attachment-2140" style="width: 600px" class="wp-caption aligncenter"><a href="http://imrehg.github.io/taiwanmap/taiwanmap.html?location=Taipei#lat=25.079136&amp;lng=121.528545&amp;z=17"><img loading="lazy" decoding="async" class="wp-image-2140 size-full" src="https://gergely.imreh.net/blog/wp-content/uploads/2015/11/map_shrine.gif" alt="Map Shrines" width="600" height="400" /></a><figcaption id="caption-attachment-2140" class="wp-caption-text">Grand Hotel replacing a shrine (yellow rooftop on the left), while shrine becomes a Taipei Martyrs&#8217; Shrine (yellow roof and cross-shaped ground on the right). In the centre, now the Taipei American Club and the ICRT radio station (click to go to this section on the map)</figcaption></figure>
<p><strong>Race courses</strong> disappeared too &#8211; together with the cavalry, I guess (like <a href="https://imrehg.github.io/taiwanmap/taiwanmap.html?location=Tainan#lat=22.992773&amp;lng=120.232814&amp;z=16">in Tainan</a>).</p>
<p>I&#8217;m sure there are a bunch of other things too, it will take some time to discover and understand things&#8230;</p>
<h3>Other notes</h3>
<p>The <strong>legends</strong> and information on the maps was pretty interesting. For example here&#8217;s the coverage map for Taipei / Taihoku, showing what aerial maps they stitched together, and when were the flights that took the photos:</p>
<figure id="attachment_2115" aria-describedby="caption-attachment-2115" style="width: 464px" class="wp-caption aligncenter"><a href="https://imrehg.github.io/taiwanmap/taiwanmap.html?location=Taipei#lat=25.018566&amp;lng=121.560241&amp;z=16"><img loading="lazy" decoding="async" class="wp-image-2115 size-full" src="https://gergely.imreh.net/blog/wp-content/uploads/2015/11/Taipei_Coverage_1944-min.jpg" alt="Taipei aerial photo coverage" width="464" height="469" /></a><figcaption id="caption-attachment-2115" class="wp-caption-text">Taipei aerial photo coverage</figcaption></figure>
<p>The Internet also taught me a few things, such as <a href="https://www.reddit.com/r/taiwan/comments/3o2vwh/taiwanese_city_maps_in_wwii_and_now/cvu2wml">this very insightful comment on Reddit</a> that traced back the Chinese / Japanese <strong>city names</strong> of these maps.</p>
<p>I was also amazed by how detailed information the Americans had about the <strong>functions of the buildings</strong> &#8211; down to the type of factories, the type schools the buildings were. I would not be surprised if the maps were supplemented by some real intelligence from the ground. Especially likely as the big cities had so much more such details than the smaller locations (where there might not be more than a few likely military installations noted). I wonder if there&#8217;s any good source to learn about this &#8211; about American intelligence behind enemy lines in the Pacific theatre of WWII.</p>
<h2>To the Future</h2>
<p>Now that everything kinda works, I think I&#8217;ll spend more time looking at the maps instead of working with them, try to learn more.</p>
<p>Hosting this project on Github is definitely pretty easy and convenient, though I start to see that their speed is not necessarily very good for big assets like the map images. Could add Cloudfront very easily to speed things up, just I don&#8217;t necessarily want to pay for that extra speed just yet. :P</p>
<p>To be able to show the loading animation I currently need to use jQuery to preload the image, then rely on the browser caching to <em>not</em> to download the image for the second time when the image is attached to the map object to create the overlay. It works pretty well&#8230; except in the Facebook Android app&#8217;s built in browser &#8211; that happily ignores caching and downloads the image twice (ouch). Would be awesome to figure out how can I get directly from the Google Map API when it finished downloading the image.</p>
<p>Might revisit a couple of the maps to see if I can improve the fit, though really just a couple of them, most are totally fine for their quality. Should also add the Japanese writing of the city names for more authenticity and discoverability.</p>
<p>And in the meantime, <a href="http://imrehg.github.io/taiwanmap/">keep checking the map</a>, and any comment or feedback is appreciated! A big thanks to the <a href="http://www.lib.utexas.edu/">University of Texas Libraries </a>and the <a href="http://www.lib.utexas.edu/maps/">Perry-Castañeda Library Map Collection</a> for the <a href="http://www.lib.utexas.edu/usage_statement.html">public domain maps</a>!</p>
<p>The post <a href="https://gergely.imreh.net/blog/2015/11/taiwan-wwii-map-overlays/">Taiwan WWII Map Overlays</a> appeared first on <a href="https://gergely.imreh.net/blog">ClickedyClick</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://gergely.imreh.net/blog/2015/11/taiwan-wwii-map-overlays/feed/</wfw:commentRss>
			<slash:comments>12</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Object Caching 22/33 objects using APC
Page Caching using Disk: Enhanced 
Lazy Loading (feed)

Served from: gergely.imreh.net @ 2026-04-07 22:30:55 by W3 Total Cache
-->