During the developers meeting at 21C3, we saw a pretty impressive
demonstartion of a map-generation software; alas, the underlying data
was (partially) contradicting itself, and the software consists of parts
in at least three programming language, all in alpha/beta stages, AFAIK.
When I saw someone upload dozens of maps on commons the other day, all
identical except for a different county marked in red, I though there
should be something simpler. Along the ideas that I published on meta
some long time ago, I wrote a PHP script for a simple map generation
tool. Source: CVS HEAD, "phase3/tools/geo.php", hereby GPL.
*Disclaimer:* This is just proof-of-concept; it would need significant
work to become useful.
This little script reads data from indexed sets of texts (currently
hardcoded as an array key=>text, but would be title=>wikipage in a
"real" implementation) and generates SVG from it. In the included
example (just run it from command line) it generates a simplified ;-]
map of Germany, showing east and west Germany (no political implications
here, just testing!) as well as the Danube.
The drwaing is based on poly-lines made from coordinate pairs in the
text entries. The poly-lines are then appended to each other as needed,
eventually forming polygons. This will save a great deal of work and
keep the data consistent: a border line between two states, for example,
is only defined once, then "included" into the polygons of both states.
To take this even further, is a river partially forms the border, the
very same polyline can be used as part of the river.
Currently, it draws each polygon separately, so in my demo, "Germany" is
still divided into two states :-(
However, I plan on a "merging" method, which will fuse two polygons into
one by removing common borders, so East and West Germany could be drawn
individually, with borders, or as the entity "Germany", with one common
border around it.
Imagine this for the U.S.: If we had the border data for all counties,
and want to draw a world map with the U.S. as a single entity, the
county polygons would be fused into state polygons, which then would be
fused into a few country polygons (continental, Hawaii, Alaska).
In my implementation, all data sets can carry meta information as well.
The Danube in the example is painted in blue because it carries a
"type:river" marker. Different object groups can be defined for
different purposes (political, geographical, etc.) Also, objects can be
labeled in all languages in-place. I currently don't show the labels,
though.
In a "real" implementation, all data would be stored as wiki pages. A
query to render some complicated view might take some time, then. But,
as long as we don't need real-time refreshment (cache as cache can!), I
would deem such a soultion prefferable to uploading (and maintaining) a
zillion map images...
Magnus