Skip to content

Interactive raster map created using Library of Congress collection 'Pictorial St. Louis' and Leaflet.

License

Notifications You must be signed in to change notification settings

aboucher410/pictorial-st-louis

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pictorial St. Louis

Mobile-friendly, interactive map created using:

Check It Out

http://jarednielsen.com/pictorial-st-louis/index.html

DIY

Download or clone this repo.

This approach is a bit ridiculous and convoluted, but it's my quick-and-dirty workaround for the Github file size limit of 100MB (The full .png is ~900MB). You need to stitch together the complete map from the slices included in the maps directory and then slice that file into tiles.

I know.

If you don't have it already, install ImageMagick:

sudo apt-get install imagemagick

Change into the maps directory:

cd maps

Run:

convert \( 01.png 02.png 03.png 04.png 05.png 06.png 07.png 08.png +append \) \
          \( 09.png 10.png 11.png 12.png 13.png 14.png 15.png 16.png +append \) \
          \( 17.png 18.png 19.png 20.png 21.png 22.png 23.png 24.png +append \) \
          \( 25.png 26.png 27.png 28.png 29.png 30.png 31.png 32.png +append \) \
          \( 33.png 34.png 35.png 36.png 37.png 38.png 39.png 40.png +append \) \
          -append ../map.png

This generates map.png in the parent directory.

cd ..

You will need gdal2tiles.py. Clone or download:

git clone https://github.com/commenthol/gdal2tiles-leaflet.git

You will also need GDAL:

sudo add-apt-repository ppa:ubuntugis/ppa
sudo apt-get update
sudo apt-get install gdal-bin
sudo apt-get -y install python-gdal

Run the script from within the repo master:

cd gdal*

And enter:

python gdal2tiles.py -l -p raster -z 0-8 -w none ../map.png ../tiles

Voila! Open index.html in your best browser (Firefox, of course).

Credits

To Do

  • Add text attribution link to index.js & map.geojson
  • Fix accuracy of marker zoom

About

Interactive raster map created using Library of Congress collection 'Pictorial St. Louis' and Leaflet.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 61.5%
  • CSS 24.9%
  • HTML 13.6%