+ All Categories
Home > Technology > From paper to screen: Putting maps on the web

From paper to screen: Putting maps on the web

Date post: 09-May-2015
Category:
Upload: petr-pridal
View: 11,410 times
Download: 8 times
Share this document with a friend
Description:
Map Curators' Workshop 2009, The British Cartographic Society, Edinburgh 9-10th September 2009
117
From paper to screen: Putting maps on the web Map Curators’ Workshop 2009 Christopher Fleet <[email protected]> Klokan Petr Přidal <[email protected]> Edinburgh, 9-10th September, 2009
Transcript
Page 1: From paper to screen:  Putting maps on the web

From paper to screen:Putting maps on the web

Map Curators’ Workshop 2009

Christopher Fleet <[email protected]>Klokan Petr Přidal <[email protected]>

Edinburgh, 9-10th September, 2009

Page 2: From paper to screen:  Putting maps on the web

Main goal of this workshop:

• Present a complete workflow for:

“Bartholomew 1912 map of Edinburgh”

• From scanning, image publishing and georeferencing up to the online map overlays

• Promote software you can use for free

• You should be able to reproduce this workflow

• Presented workflow is not the only one. There are different ways how to achieve the same goal.

Page 3: From paper to screen:  Putting maps on the web

Workshop structure

1 From paper to computer

2 Web presentation

3 Georeferencing

4 Online publishing of maps

1

Page 4: From paper to screen:  Putting maps on the web

1. From Paper to Computer

A. Image Capture : scanners and cameras

B. Digital Images

Page 5: From paper to screen:  Putting maps on the web

1. From Paper to Computer

A. Image Capture : scanners and cameras

Overhead studio cameras

Sheet-feed scanners

Flatbed scanners

Sensors

Page 6: From paper to screen:  Putting maps on the web
Page 7: From paper to screen:  Putting maps on the web
Page 8: From paper to screen:  Putting maps on the web

METIS Digital Reproduction System (Rome)

Double A0 size

Page 9: From paper to screen:  Putting maps on the web

Icam Atlas camera used in Kent Tithe Map project

Page 10: From paper to screen:  Putting maps on the web

Lumiere Jumboscan – 30,000 x 18,000 pixels, 5 x 2 metre scan area

Page 11: From paper to screen:  Putting maps on the web
Page 12: From paper to screen:  Putting maps on the web
Page 13: From paper to screen:  Putting maps on the web

Colortrac 24120 – 24” x 36” flatbed scanner

Page 14: From paper to screen:  Putting maps on the web

1. From Paper to Computer

B. Digital Images

Resolution

Pixel bit-depth

Colour

File formats

Software

Page 15: From paper to screen:  Putting maps on the web

Representation of an object in Raster and Vector formats

Raster – cell based Vector – point, line and area based

Page 16: From paper to screen:  Putting maps on the web

Resolution –

the spatial detail or number of pixels in an image…

Page 17: From paper to screen:  Putting maps on the web

Cornell University Quality Index

For 1-bit bitonal scanning:

 

x-height QI=3.6 QI=5 QI=8(smallest dimension that

needs to be captured)

0.5 mm 554 dpi 769 dpi 1231dpi

1.0 mm 277 dpi 385 dpi 615 dpi

1.5 mm 185 dpi 256 dpi 410 dpi

2.0 mm 138 dpi 192 dpi 308 dpi

Page 18: From paper to screen:  Putting maps on the web

Cornell University Quality Index

For 8-bit greyscale/colour scanning

 

x-height QI=3.6 QI=5 QI=8(smallest dimension that

needs to be captured)

0.5 mm 277 dpi 385 dpi 615 dpi

1.0 mm 138 dpi 192 dpi 308 dpi

1.5 mm 92 dpi 128 dpi 205 dpi

2.0 mm 69 dpi 96 dpi 154 dpi

Page 19: From paper to screen:  Putting maps on the web

400 dpi

300 dpi

200 dpi

Page 20: From paper to screen:  Putting maps on the web

1. From Paper to Computer

B. Digital Images

Resolution

Pixel bit-depth Colour

File formats

Software

Page 21: From paper to screen:  Putting maps on the web

Pixel bit depth - the number of values for any pixel

 

•1 bit - 2 values - Black or white

•8 bit - 256 shades (of grey or colour). Effectively, a palette of 256 colours

•24 bit RGB (256 levels for each red, green and blue channel) - approx 17 million colours (2563)

 

Most archival/preservation colour imaging uses 24-bit colour. Higher bit levels allow greater colour precision, but such precision may not justify exponentially larger file sizes.

Page 22: From paper to screen:  Putting maps on the web

8-bit indexed colourRecording 256 values for every pixel from a look-up table

Page 23: From paper to screen:  Putting maps on the web

24-bit RGB colourrecording 3 channels of 256 values for red, green and blue for every pixel

Page 24: From paper to screen:  Putting maps on the web

8-bit indexed colourRecording 64 values for every pixel from a look-up table

Page 25: From paper to screen:  Putting maps on the web

Converting to bitonal using threshold

Page 26: From paper to screen:  Putting maps on the web

Resolution –

the spatial detail or number of pixels in an image

Optical (true) resolution is the inherent resolution of the scanner based on the size of the imaging sensor and the magnification of the optical system.

Interpolated resolution is a synthetic or calculated resolution that artificially increases the original optical captured resolution by image processing.

Page 27: From paper to screen:  Putting maps on the web

1. From Paper to Computer

B. Digital Images

Resolution

Pixel bit-depth

Colour File formats

Software

Page 28: From paper to screen:  Putting maps on the web

Additive colour –

light based - scanners, cameras, monitors

Subtractive colour –

print and paper based

Page 29: From paper to screen:  Putting maps on the web
Page 30: From paper to screen:  Putting maps on the web

Device-dependent Colour Transformations

T

T

T

TT

T

TT

TT

TT

TT

= each a different device-to-device transform

Page 31: From paper to screen:  Putting maps on the web

Device-independent Colour Transformation

T

T

T T

T

T

= each a device-to-standard colour space transform

T

T StandardColour Space

Page 32: From paper to screen:  Putting maps on the web

ICC Workflow

PCS

Source profile Destination profile

Source device colour data Destination device colour data

Colour Transform

Page 33: From paper to screen:  Putting maps on the web

Generating an output or printer profile

Page 34: From paper to screen:  Putting maps on the web

Generating an input or capture profile

Page 35: From paper to screen:  Putting maps on the web

1. From Paper to Computer

B. Digital Images

Resolution

Pixel bit-depth

Colour

File formats Software

Page 36: From paper to screen:  Putting maps on the web

File formats – masters, derivatives, and compression

Formats for preservation masters:

  TIFF (Tagged Image File Format) - lossless

PNG (Portable Network Graphic) - lossless

JPEG2000 or JP2 (Joint Photographic Experts Group)

 

Formats for derivatives (display/distribution):

GIF (Graphics Interchange Format) - lossy

JPEG - lossy

TIFF with (Lempel-Ziv-Welch compression) -lossy

 

Wavelet-based compression:

 

JPEG2000 - can choose lossy or lossless versions

MrSID (Multi-resolution Seamless Image Database), DjVu or ECW (Enhanced Compressed Wavelet - lossy

Page 37: From paper to screen:  Putting maps on the web

Calculating image sizes (of uncompressed TIFF images)

 

Use formula: (height x width x bit depth x dpi2) / 8 = size in Kb

 

eg. for a 24 x 36" map

in greyscale at 200 dpi - 24" x 36" x 8 x 2002 = 35 Mb

in colour at 200 dpi - 24" x 36" x 24 x 2002 = 103 Mb

in colour at 300 dpi - 24" x 36" x 24 x 3002 = 233 Mb

in colour at 400 dpi - 24" x 36" x 24 x 4002 = 415 Mb

 

Maps are often much larger! A 48 x 50” document scanned in colour at 400 dpi will generate a 1.1 Gb TIFF file.

Page 38: From paper to screen:  Putting maps on the web

1. From Paper to Computer

B. Digital Images

Resolution

Pixel bit-depth

Colour

File formats

Software

Page 39: From paper to screen:  Putting maps on the web

Photoshop… rotating the image

Page 40: From paper to screen:  Putting maps on the web

Photoshop – rotated and aligned image

Page 41: From paper to screen:  Putting maps on the web

Photoshop – altering image size

Page 42: From paper to screen:  Putting maps on the web

Photoshop – cropping an image

Page 43: From paper to screen:  Putting maps on the web

Photoshop – altering colour bit depth

Page 44: From paper to screen:  Putting maps on the web

Photoshop – saving image in various formats

Page 45: From paper to screen:  Putting maps on the web

Open source software for processing and presentation of scanned images

Standard images

• Gimp (alternative to Adobe Photoshop)ImageMagic and Irfanview (batch processing)

Stitching and correcting images

• Hugin, AutoStitch, Enblend (PanoTools)

Large images of over 10,000 pixels

• NIP2 and VIPS library

Page 46: From paper to screen:  Putting maps on the web

NIP2 and VIPS library

• Free software (GPL) for Windows/Mac/Linux

• Processing of images with unlimited size

• Support for High Dynamic Range images

• Correct colour handling with ICC profiles

• A Graphical User Interface “Excel for images” changeable steps

Page 47: From paper to screen:  Putting maps on the web
Page 48: From paper to screen:  Putting maps on the web
Page 49: From paper to screen:  Putting maps on the web
Page 50: From paper to screen:  Putting maps on the web
Page 51: From paper to screen:  Putting maps on the web
Page 52: From paper to screen:  Putting maps on the web
Page 53: From paper to screen:  Putting maps on the web
Page 54: From paper to screen:  Putting maps on the web
Page 55: From paper to screen:  Putting maps on the web
Page 56: From paper to screen:  Putting maps on the web
Page 57: From paper to screen:  Putting maps on the web
Page 58: From paper to screen:  Putting maps on the web

• LProf– Creation ICC profiles for scaners, monitors and printers

– OpenSource: http://lprof.sf.net/

• VIPS– Can create an ICC profile as well

– Conversion of different ICCs

ICC Profile

Page 59: From paper to screen:  Putting maps on the web

Workshop structure

1 From paper to computer

2 Web presentation

3 Georeferencing

4 Online publishing of maps

2

1

Page 60: From paper to screen:  Putting maps on the web

400 DPI9606 x 7322 px

202 MB uncompressed TIFF~107 MB JPEG2000 (lossless)

15 MB JPEG 85%~ 8 MB JPEG2000 (loosy)

Page 61: From paper to screen:  Putting maps on the web

High resolution imagery on the web

• Image size is too big for the traditional display in the web browser - to keep the details we need to provide the image in parts - cutting into tiles

• Technique of the “pyramid” provide

zooming and panning

• The viewer software assemble the

tiles and allows experience of

browsing over a seamless image

Page 62: From paper to screen:  Putting maps on the web

Viewers

• Different technology, look & feel, license and authors, but the same principle

– JavaScript: OpenLayers, MooViewer, PanoJS, SeaDragonJS, ...

– Flash: Zoomify, OpenZoom, Closer, ...

– iPhone: Microsoft SeaDragon (DeepZoom), ...

– 3D: Google Earth, ...

• For one image source more viewers

Page 63: From paper to screen:  Putting maps on the web

ZOOMIFY, MOOVIEWER, OPENZOOMTILES PREGENERATED OR SERVED BY IIPIMAGE

Page 64: From paper to screen:  Putting maps on the web
Page 65: From paper to screen:  Putting maps on the web

Pregenerated tiles

• The easiest, fastest and most efficient way how to publish high-resolution images on the web

• A desktop application cut your master image into the tiles (hundreds of small pictures) in advance

• You just have to copy the result to the web, no extra server configuration - “it just runs”

• Formats: Zoomify, SeaDragon (DeepZoom), OpenZoom, ... - differences in the name of the tiles files: “z-x-y.jpg”, “x_y_z.jpg”, ...

• [disadvantage: thousands of small files]

Page 66: From paper to screen:  Putting maps on the web

• Really simple to use, almost no technical knowledge for publishing the high resolution images to the Internet

• You generate tiles and copy them on your server, no further configuration is needed

• Original: http://www.zoomify.com/

• Existing open-source implementation for tiling software as well as viewers

Page 67: From paper to screen:  Putting maps on the web

Dynamically generated tiles

• On your server is a program, which generates the tiles from your images in the moment of visit

• You can keep just one copy of the image - serve from the masters (“open archive”)

• Easily support for more viewers

• Dynamic color corrections

• Formats: JPEG2000, MrSID, ECW, pyr. TIFF

• [disadvantage: you need to install software on the server, can be slow (scalability)]

Page 68: From paper to screen:  Putting maps on the web

Dynamically generated tiles 2

• Software: image server

– Commercial: LizardTech, Aware, XLImage, ...

– Open-source for JPEG2000: IIPImage, Djatoka

• Usually need of special formats: JPEG2000, MrSID, ECW, pyramid TIFF

• You need your own server, you need IT knowledge to set it up. Usage is quite simple: add new .jp2 to a relevant directory

Page 69: From paper to screen:  Putting maps on the web

• Fast image server, OpenSource GPL: for free

• Color Correct (ICC profile, L a*b* space)

• SourceForge: http://iipimage.sf.net/

• Displays TIFF images (stored on the server)

• Zoomify-compatible (we supported dev)

• Support for JPEG2000 (we supported dev)

ImageServer: IIPImage

Page 70: From paper to screen:  Putting maps on the web

Open-Source and JPEG2000

• Software: image server

– Commercial: LizardTech, Aware, XLImage, ...

– Open-source for JPEG2000: IIPImage, Djatoka

• Usually need of special formats: JPEG2000, MrSID, ECW, pyramid TIFF

• You need your own server, you need IT knowledge to set it up. Usage is quite simple

• http://help.oldmapsonline.org/jpeg2000/

Page 71: From paper to screen:  Putting maps on the web

DEMO

Zoomify Express

Described step-by-step at:http://help.oldmapsonline.org/publish/

Page 72: From paper to screen:  Putting maps on the web

• Publishing of large images on the web: always tiles!

• Pan & Zoom viewers are assembling the tiles again

• Pregenerated (zoomify, deep zoom..)– Viewers: Zoomify, OpenZoom, OpenLayers, PanoJS,... Google

Earth ... Mobile phone ... ?– Hosting on the web: no configuration. Upload only.– Advanced hosting: Amazon S3, Google App Engine, CDN– DEMO: http://help.oldmapsonline.org/publish/

– DEMO: Zoomify Express “www.zoomify.com”– DEMO: Firefox “S3Fox” and Amazon S3

• Dynamic delivery (image servers):– From JPEG2000, TIFF, MrSID, ECW, jpeg files– Software on the server: LizardTech, Aware, ...– Open-Source: IIPImage (JPEG2000, TIFF), Djatoka

2. Web Presentation (recapitulation)

Page 73: From paper to screen:  Putting maps on the web

Workshop structure

1 From paper to computer

2 Web presentation

3 Georeferencing

4 Online publishing of maps

2

1

3

Page 74: From paper to screen:  Putting maps on the web

Why geo-reference early maps?

1. Provides new ways of integrating early maps with other information

2. Provides new ways of understanding the content of early maps

3. Provides a better means of accessing early maps

Page 75: From paper to screen:  Putting maps on the web

1 Geo-referencing to integrate tithe map information within historical GIS

Alastair Pearson ‘Digitizing and analyzing historical maps to provide new perspectives on the development of the agricultural landscape of England and Wales’ e-Perimetron (www.e-perimetron.org/Vol_1_3/Vol1_3.htm)

Page 76: From paper to screen:  Putting maps on the web

1 Integrating early maps with height information

Michael F. Davie & Mitia Frumin, ‘Late 18th century Russian Navy maps and the first 3D visualization of the walled city of Beirut’ e-Perimetron (www.e-perimetron.org/Vol_2_2/Vol2_2.htm)

Page 77: From paper to screen:  Putting maps on the web
Page 78: From paper to screen:  Putting maps on the web
Page 79: From paper to screen:  Putting maps on the web
Page 80: From paper to screen:  Putting maps on the web
Page 81: From paper to screen:  Putting maps on the web
Page 82: From paper to screen:  Putting maps on the web

2 Geo-referencing for understanding the content of early portolan charts

JA Gaspar

‘The Myth of the Square Chart’ e-Perimetron

(/www.e-perimetron.org/Vol_2_2/Vol2_2.htm)

Page 83: From paper to screen:  Putting maps on the web

Miltiadis Daniil ‘Comparing by digital transparency the differencesbetween two almost identical 17th century maps of North Aegean Sea’ e-Perimetron (www.e-perimetron.org/Vol_1_4/)

2. Geo-referencing for using in digital transparency techniques and animation

Page 84: From paper to screen:  Putting maps on the web

Principles of geo-referencing

Fitting old map to present day real-world location 1. Open early map as image.

2. Add or specify Control Points or Link Points of known locations to image 3. Transform image to the new position based on these control points(software eg. ESRI ArcMap, MetaCarta Rectifier, Microsoft MapCruncher)

Need to be clear about the coordinate system, particularly of the destination image:

• Within the UK, the British National Grid is often easiest to use, and allows integration with Ordnance Survey gazetteers and mapping

• Internationally, a conversion to the Global Mercator projection on a spherical approximation of the Earth is widely used for overlays in Google Maps and Earth, Microsoft Virtual Earth, Yahoo Maps, etc.

Need to be clear about the transformation method from the original to the destination images

Page 85: From paper to screen:  Putting maps on the web

Open Bartholomew 1912 Edinburgh map to be geo-referenced in ArcMap

Page 86: From paper to screen:  Putting maps on the web

Georeferencing toolbar

Geo-referencing toolbar

Page 87: From paper to screen:  Putting maps on the web

Add first control point to Bartholomew map…

Page 88: From paper to screen:  Putting maps on the web

In Table of Contents, zoom to target geo-referenced Edinburghshire 1860s map

Page 89: From paper to screen:  Putting maps on the web

The Edinburghshire 1860s geo-referenced map

Page 90: From paper to screen:  Putting maps on the web

Destination control point on the Edinburghshire geo-referenced target map

Page 91: From paper to screen:  Putting maps on the web

Bartholomew map after first control point added

Page 92: From paper to screen:  Putting maps on the web

Adding second control point to Bartholomew map…

Page 93: From paper to screen:  Putting maps on the web

…and positioning its destination point on the target

Page 94: From paper to screen:  Putting maps on the web

Third control point in bottom left of Bartholomew map

Page 95: From paper to screen:  Putting maps on the web

Adjusting transparency of Bartholomew map to view alignment and accuracy of geo-referencing

Page 96: From paper to screen:  Putting maps on the web

Editable link table of control points and transformation choices for geo-referencing

Page 97: From paper to screen:  Putting maps on the web

Specifying the coordinate system

Page 98: From paper to screen:  Putting maps on the web

Clearing black edges through nodata pixel

Page 99: From paper to screen:  Putting maps on the web

Clearing black edges through a nodata pixel value

Page 100: From paper to screen:  Putting maps on the web

The black edges taken away

Page 101: From paper to screen:  Putting maps on the web

Saving the geo-referenced Bartholomew map

Page 102: From paper to screen:  Putting maps on the web

Exporting the geo-referenced Bartholomew map

Page 103: From paper to screen:  Putting maps on the web

DEMO

Online Georeferencing Tool(under development)

http://www.georeferencer.org/

Page 104: From paper to screen:  Putting maps on the web

Workshop structure

1 From paper to computer

2 Web presentation

3 Georeferencing

4 Online publishing of maps

2

1

3

4

Page 105: From paper to screen:  Putting maps on the web

Dynamic vs. pregenerated tiles

• Traditional dynamic publishing: MapServer, GeoServer, ArcIMS - standard: OGC WMS

• Advantages: possibility to change map projections on the fly, interoperability with all GIS tools, broadly accepted standard

• Disadvantages: SLOW (not well scalable), not as user-friendly for web visitors, lower quality output (because of the limited rendering time)

• New approach: tiles

Page 106: From paper to screen:  Putting maps on the web

A Brief Look BehindGoogle Maps...

• User-friendly interface. Fast! FAST!

• Maps are rendered in advance in a batch, during update of geodata (different approach then with dynamic WMS servers)

• The map is cut into tiles, user receives just tiles for extent he is looking at. All tiles has fixed predefined geographic boundaries.

• Pre-rendered tiles stored in Google BigTable database. Redundancy. Load-balancing.

Page 107: From paper to screen:  Putting maps on the web

FIXED ZOOM LEVELS

Page 108: From paper to screen:  Putting maps on the web

PROJECTION AND COORDINATESYSTEM OF GOOGLE MAPS

• Lat/Long WGS84 datum coordinates always displayed to users. Popular from GPS devices, strictly used in the KML format.

• Map rasters are projected by a global Mercator projection: “Spherical Mercator”. EPSG:900913 / EPSG:3785 (meters)

• Conformal, cylindrical. Cropped to square (maximal latitude ~ 85.05 degrees)

• Simplified calculation: WGS84 ellipsoid is handled as sphere in all calculation!

Page 109: From paper to screen:  Putting maps on the web

CONVERSION OF COORDINATES FOR GOOGLE MAPS(GLOBALMAPTILES.PY MODULE)

GEODETIC COORDINATESLATITUDE LONGITUDEWGS 84 (EPSG:4326)

SPHERICAL MERCATORMETERS

EPSG:3785 / EPSG:900913

PYRAMID COORDINATESXYZ PIXELS / ZOOM

WEB VIEWERS

TILE INDEXXYZ TILE / ZOOM

TILE MAP SERVICE

Page 110: From paper to screen:  Putting maps on the web

TILE ADDRESSING

• Google XYZ: origin (x,y)=(0,0) in top-left corner

• OSGEO Tile Map Service (TMS) XYZ: origin (x,y)=(0,0) in bottom-left corner of extent

• Microsoft QuadTree: by quadrants “12022”

• WMS-C (WMS requests for predefined tile extents - cache) / OGC Cashed WMS (extension for tile query)

• OGC Web Map Tile Service (WMTS) - draft

Page 111: From paper to screen:  Putting maps on the web
Page 112: From paper to screen:  Putting maps on the web

HOW CAN I PUBLISH MY OWN MAPS

THE SAME WAY?

Page 113: From paper to screen:  Putting maps on the web

TILES ARE SAVED (CACHED)FROM EXISTING DYNAMIC WMS SERVER

• Open Source Projects:

• TileCache.org (Python)

• GeoWebCache.org (Java Servlet)

WMS Server

WMSClient

WebClient (tiles)

Tile Cache

WMS

WMS

Tiles(TMS,

WMS-C)

Page 114: From paper to screen:  Putting maps on the web

TILES ARE PRE-RENDERED DIRECTLY

• Raster input:

• GDAL2Tiles (my GSoC) & MapTiler GUI

• MSR MapCruncher

• Features (vectors)

• Mapnik, GMapCreator

Tiles as static files

WebClient (tiles)

Tiles(TMS or others) WMS

ClientWMS Proxy(MapServer)

WMSTMS

Page 115: From paper to screen:  Putting maps on the web

• Generates image tiles (PNG files) from a raster maps (GeoTIFF, JPEG2000, MrSID, ECW, Erdas HFA, BSB, ...)

• It uses existing geometadata (WKT, EPSG, World Files) and supports huge rasters (unlimited filesize)

• Simple web viewer (OpenLayers, Google Maps API)

• KML SuperOverlay Metadata (Google Earth, indexing)

• Tile Map Service (TMS) compatibility

• Raster warping to Spherical Mercator.

MAPTILER (GDAL2TILES)

Page 116: From paper to screen:  Putting maps on the web

DEMO

MapTiler

Described step-by-step at:http://help.oldmapsonline.org/publish/

Page 117: From paper to screen:  Putting maps on the web

Recapitulation

• http://help.oldmapsonline.org/publish/

• Image publishing: tiles: Zoomify, ...

• Alternative: IIPImage (direct from jp2,tif) or commercial tools

• Several pan&zoom viewers

• Georeferencing: GIS tools

• Under development: Georeferencer.org

• Map publishing: tiles: MapTiler (beta)

• Alternative: MapServer, GeoServer and TileCache, GeoWebCache or commercial ESRI ArcIMS.

• Standard: OGC WMS, tiles: TMS & OGC WMTS


Recommended