Vanalinnad | Readme | Info

vanalinnad

Historical maps of Estonian cities under the grid of today's street network.

Shortcut keys: F11 enables/disables fullscreen. By OpenLayers defaults arrow keys pan, +/- keys zoom & Page Up/Page Down/Home/End scroll by three quarters of a page. Additionally, comma (,) displays next and period (.) will display previous historical map.

Old map symbols: < 1900, 1953 - 1977 (PDF)

Map URL examples

  1. index.html?site=Tallinn : all maps of Tallinn.
  2. index.html?site=Tallinn&year=1968 : Tallinn in year 1968.
  3. index.html?site=Tallinn&year=1968&zoom=15&lat=59.43736&lon=24.78081 : Tallinn in year 1968, Kadriorg area.
  4. index.html?site=Tallinn&year=1968&zoom=15&lat=59.43736&lon=24.78081&years=1968.1911.1885.1856 : Tallinn in year 1968, Kadriorg area. Selectable are maps only from years 1968, 1911, 1885 and 1856.

Hints:

  1. for debug mode, append &debug=1 to URLs.
  2. if you add &draw=KML or &draw=GPX to WMS urls, you can draw and export KML or GPX tracks.

Adding new data to application

Following describes data adding process with Debian Linux 8.4.

Dependencies

  1. Create writable directory {VANALINNAD_ROOT_DIR}/cache
  2. Download GDAL 1.11.1
  3. Unpack and install it: ./configure ; make ; sudo make install
  4. Install markdown and ImageMagick etc (sudo apt-get install markdown imagemagick python-gdal xsltproc osmctools wget)
  5. If neccessary: sudo ln -s /usr/lib/libproj.so.0 /usr/lib/libproj.so
  6. Install missing Perl modules (sudo cpan XML::Simple JSON Storable Math::Round or apt-get install libxml-simple-perl libjson-perl libstorable-perl libmath-round-perl)

Creating new site

Run dev/newsite/newsite.pl {SITE} . Add new <Placemark> with <name>{SITE}</name> to vector/selector.kml to make new site visible on main page. NB! Dont use symbols outside standard latin alphabet in {SITE}, it will be included in catalogue names. You can add "real name" into /Document/Placemark[x]/description @ vector/selector.kml and into /city @ vector/places/{SITE}/layers.xml .

Adding new historical map to site

In following, {SOURCEFILEDIR} is /dirsource from conf.xml.

  1. Cut away and whiten original maps edges, legends, empty areas etc. It makes tile generation speed, repo size and download speed smaller.
  2. Save this file as {SOURCE_FILE} to:
    1. {SOURCE_FILE_DIR}/places/{SITE}/composed/{COMPOSITE_YEAR}, if new map is composite (composed from more then one map).
    2. {SOURCE_FILE_DIR}/places/{SITE}, if new map is NOT composite.
  3. Georeference image @ vector/places/{SITE}/gdal.xml . In following, {GEOREFERENCE} is at last 3 GCPs in form -gcp {X_COORDINATE_OF_GCP_ON_SOURCE_IMAGE} {Y_COORDINATE_OF_GCP_ON_SOURCE_IMAGE} {EAST_COORDINATE_OF_GCP} {NORTH_COORDINATE_OF_GCP}. For example, GCPs can be narrow crossroads which are on both historic and modern maps. You can use index.html?debug=1 for finding GCPs geographical coordinates and dev/pixelpicker.html for finding GCP pixel coordinates.
    1. If new map is composite, add <translate map="{YEAR}" composite="{COMPOSITE_YEAR}"><t file="{SOURCE_FILE}" gcps="{GEOREFERENCE}"/></translate> and <composite id="{COMPOSITE_YEAR}" maps="{YEAR}" montage="yes"/> to gdal.xml. Later, new composite map years can be added to attribute maps, separated by comma. NB! Order of this list decides, how component maps overwrite eachother. Remove attribute montage="yes", when component maps dont touch eachother.
    2. If new map is NOT composite, add <translate map="{YEAR}"><t file="{SOURCE_FILE}" gcps="{GEOREFERENCE}"/></translate> to gdal.xml.
  4. Run dev/tiler.pl -s {SITE} -y {YEAR}. (If you for some reason dont want to generate map tiles but still want to generate misc data files, add -r flag.) NB! Only last <t> from <translate> added in previous step is taken into account while rendering tiles.

Adding road layers from OpenStreetMap

  1. Bounds of road layers can be determined by adding tag <roadbounds w="..." s="..." e="..." n="..."/> to {VANALINNAD_ROOT_DIR}/vector/places/{SITE}/layers.xml. If this tag or some of its coordinates are missing, other boundaries are calculated from maximum values of tile layers in {VANALINNAD_ROOT_DIR}/vector/places/{SITE}/layers.xml.
  2. Run ./dev/osm2xml/osmroads.pl {SITE}
    1. If original OSM data is too big, process might stall. In case you need only roaddata from that site, add highway as 3rd parameter: ./dev/osm2xml/osmroads.pl {SITE} highway
  3. Original KML files roads0.kml ... roads4.kml were generated into {VANALINNAD_ROOT_DIR}/cache/. You can merge those files into fewer files.
  4. For every {SOURCE_KML} created in previous step: ./dev/kml_minify.pl .00001 cache/{SOURCE_KML} vector/places/{SITE}/{FINAL_KML}
  5. For every {FINAL_KML} created in previous step, add tag <layer type="roads" name="{LAYER_NAME}" file="{FINAL_KML}" maxres="{MIN_ZOOM_LEVEL}"/> to {VANALINNAD_ROOT_DIR}/vector/places/{SITE}/layers.xml

License

Copyright 2013-2017, juks at alkohol ee. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY juks at alkohol ee ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of juks at alkohol ee.

Vanalinnad | Readme | Info