This is a desktop application for displaying Google Maps (and Bing) aerophotos with specially tailored distortions to make railway track layouts more clearly visible.
I don't particularly expect anyone but myself will really want to use it, but just in case someone I tell about it is curious, here are some notes:
For gross navigation, the application displays map tiles it has downloaded from one of various sources.
-
OpenStreetMap -- © OpenStreetMap Foundation and its contributors, map data licensed under Open Data Commons Open Database License. Tiles rendered by OpenStreetMap itself.
-
OpenStreetMap "Humanitarian" -- Map data from OpenStreetMap, rendered by OpenStreetMap France.
-
OpenTopoMap -- Map data from OpenStreetMap.
Kartendarstellung: © OpenTopoMap (CC-BY-SA)
The program can also show a map overlay from OpenRailwayMap, mainly useful because it contains track numbers in many locations
- OpenRailwayMap -- Data © OpenStreetMap contributors, Style: CC-BY-SA 2.0 OpenRailwayMap.
The aerophoto views by default use orthophoto tiles from Microsoft
Bing. I use an URL format I've reverse
engineered from their public map website. Since they're serving tiles
without as much as requiring a faked Referer header, I suppose they
can't be too opposed in practice to consuming them in a small-scale
hobby project.
Bing has a official APIs that I probably should be using instead (which would also provide specific attributions to their photo subproviders, which vary from place to place) -- but those require API keys, and even though they have free plans available, it's unclear at best whether it makes sense to bundle an API key with source code I put up on GitHub.
If the provider actively complains to me, I suppose I can rewrite the code to load an API key from a local configuration file and require the user to acquire one themself, but I so far I'm not bothering.
In late October 2026, Google Maps changed the protocol their web maps uses to download aerophotos, and I haven't managed to reverse-engineer the new protocol well enough to download photos from them yet. That's a shame because Google often have better quality photos than Bing.
Worse yet, the official API that had been my backup plan for this eventuality turns out to be explicitly documented not to be availabe for EEA residents, even if you're willing to pay them. Huh.
If you happen to have Google tiles cached from previous runs of the program, you can still use them in warps by selecting Google in the right sidebar. But, at least for the time being, no new tiles can be downloaded.
The national mapping agency @geodanmark provides excellent orthophotos licensed as CC-BY-4.0. Getting them from their web server is slightly clunky, though -- you may need to create and configure an API key to use it with Mapwarper. See documentation/apikeys.md for details.
Installation, what's that?
If you're on Linux or MacOS and have a Java Development Kit of at
least version 22 installed, (so there's a javac command on your
path), you should be able to just check out the contents of this Git
repository and run the mapwarper script. It will compile the source
code into a mapwarper.jar the first time it runs. If you pull new
code changes from GitHub, delete the JAR file to provoke a
recompilation.
On Windows I've had success with running the mapwarper script from
Git Bash. Other bashes ought to work as well.
Or, if you're super ambitious, load the source tree into Eclipse,
Visual Studio Code, or another IDE that will populate a bin/
directory automatically. The mapwarper script will use that
preferentially over a mapwarper.jar.
On Windows without Unix emulation or an IDE, you'll be more on your own with compiling the code. If you know how to run a Java compiler at all, it should be straightforward -- there are no dependencies beyond what comes with Java out of the box!
From time to time (if people bug me for it) I might release a pre-built JAR for the benefit of people who only have a Java Runtime Environment installed. You'll still want to check out the source tree from Git in order to get the XML config file that defines tileset sources, and my example warp definitions.
Strictly speaking I don't know the program will work on MacOS, but Swing claims to be cross-platform, so there's at least a fairly good chance that it should. If you try it, let me know how it goes!
The program spams copious status output to the terminal -- mostly for debugging purposes -- so don't expect it to run quietly in the background.
The program starts by creating a cache directory for downloaded map
tiles in an appropriate location. The default location can be
overridden by giving a --tilecache argument. The program never
itself deletes anything from this cache itself, so be sure to clear it
out once you're done playing.
With a 4K display you need to add a -Dsun.java2d.uiScale=2 argument
to the java command line, at least on Linux. (I haven't found a
robust way to autodetect the need for this yet). You can also specify
this in the program's XML config file.
Navigate to a *.vect file in the cases/ subdirectory, single click
on it to load, and then press W to switch to warped view and locate
the tracks. To get back to the graphical track picker the program
starts up in, press R to get back to an ordinary unwarped map view,
then O.
Drag holding the middle mouse button to move the map. Or, if you don't
have a working middle button, press . to select a tool where the
first button will do it.
Beyond that, play around. Most of the command keys are documented in the right-click menu in the map view. For many tools, holding Shift down previews what the result of clicking would be. In the drawing tools, Ctrl-click (or Ctrl-drag) deletes nodes.
If you can read Danish, my original design notes in gui.txt may give you an idea how the UI is supposed to work. Otherwise you're on your own. (In any case, I don't have a written-down explanation in any language about the underlying model of how a chain of vector segments defines a warped map projection ...)
The cases/ subdirectory contains my own warp definitions, currently
mostly for large German stations.
Many of them were created with earlier versions of the program, so they shouldn't be taken as canonical examples of how best to use the current feature set.
I can be reached at henning.makholm@gmail.com -- though I don't have a good track record of answering emails promptly ...