31
Web Map Printing: Which Solution Is For You? presented by Xudong Liu and Bo Guo, PE, PhD Xudong Liu and Bo Guo, PE, PhD of Gistic Research, Inc

Web Map Printing: Which Solution Is For You? - Gistic Research Inc

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Web Map Printing: Which Solution Is For You?

presented by

Xudong Liu and Bo Guo, PE, PhD Xudong Liu and Bo Guo, PE, PhD of Gistic Research, Inc

Introduction

� Web browsers provide very limited options for content printing, but fortunately…

� There are programming tools available to enhance web map printing

� This presentation will NOT address how to � This presentation will NOT address how to develop printing utilities

� In this presentation we WILL� Summarize available tools and frameworks� Demonstrate their capabilities� Hopefully help you decide which tool is for you

Tools and Approaches

� Browser print � Custom light-weight print server � FOSS or commercial print servers

� MapFish Print server� MapFish Print server� QGIS server � ArcGIS server

Browser Print

� Applicable cases� Simple layout� WYSIWYG� No control of map resolution

� Output� Output� To printer� To PDF (PDF plug-in may be required)

� Programming � For layout design

� Demo

Light-weight Print Server

Introduction� Applicable cases

� Layout control� Mash-up: map with other forms of deliverables

(e.g., diagram, data table)� Map image resolution is possible

� Output� As file

Light-weight Print ServerArchitecture

Makes print requestWeb Services

Tiles/WMS

Vector

Browser Print Server

Returns print file

Tiles/Image

Vector

Light-weight Print ServerWorkflow

� Basemap as image� Export WMS� Stitch tile services

� Vector overlay� Vector overlay� Draw over basemap

� Insert map image into PDF document� Returns PDF to browser

Light-weight Print Server

Demo� LinearBench Print

� Python/Django� OWSLib: get WMS image� PIL: draw overlay over image� PIL: draw overlay over image� ReportLab: PDF generation and editing

� Demo

High-quality Map PrintOutline

� Applicable cases� High resolution� Customized layout design� Different page sizes� Mash-up with various data sources� Mash-up with various data sources

� Solutions � MapFish Print (FOSS)� QGIS Server (FOSS)� ArcGIS Server

MapFish Print - Intro

� Java-based server� Open and flexible framework� Does not host data� Process web-accessible data services

� Installation and compilation� Installation and compilation� Requires some code to run on your server

� Java servlet, Python/Pylons and Ruby on Rails

� GeoServer/MapServer �Use plug-ins

MapFish Print Architecture

Overall

Print Server

Web

WMS/Tile, WFS

Make Send

Browser

Web Services Make

request with

specs

Send back PDF

MapFish Print Architecture

Server Configuration

Print Server

Web

WMS/Tile, WFSYAML:

Layout/page configs

Browser

Web Services Send

back PDF

Make request

with specs

MapFish Print Architecture

Protocol – info.json

Print Server

Web

WMS/Tile, WFSYAML:

Layout/page configs

Browser

Web Services Return

YAML Layout configs

info.jsonrequest

MapFish Print Architecture

Protocol – print.pdf

Print Server

Web

WMS/Tile, WFS

Make

YAML:Layout/page

configs

Browser

Web Services Return

print-outPDF file

Makeprint.pdfrequest

withprinting specs

MapFish Print Architecture

Protocol – create.json

Print Server

Web

WMS/Tile, WFS

Make

YAML:Layout/page

configs

Browser

Web Services Return

URL ofprint-outPDF file

Makecreate.json

requestwith

printing specs

MapFish Print Architecture

Protocol – {ID}.pdf

Print Server

Web

WMS/Tile, WFS

Make{ID}.json

YAML:Layout/page

configs

Browser

Web Services Return

PDF file

{ID}.jsonrequest

Withknown

print-out file ID

MapFish Print - Demo

� GeoExt� Rich-client interactive application framework� JavaScript, ExtJS + OpenLayers� Best support for MapFish Print� Best support for MapFish Print

� Demo

QGIS Server Print - Intro

� QGIS� Similar to ArcGIS Desktop� FOSS GIS software

� QGIS Server� Same core libs as QGIS Desktop� Same core libs as QGIS Desktop� Provide WMS as web-accessible map

� QGIS Composer� Map layout design tool (in QGIS Desktop)

� QGIS Server Print� Enable getPrint request capability in QGIS Server

QGIS Server Print - Architecture

QGIS Server (WMS)

QGIS Desktop

Compositions

Map data

Browser

Make request

Send back PDF

� Demo

ArcGIS Server Print

� ArcGIS Server� Host resources available online

� Map data (Esri Map Service, WMS, WFS, WCS, etc)� Geo-processing tools

� Sharing and interoperability

� ArcGIS Server Print� ArcGIS Server Print� Basic print vs advanced print� Geo-processing service� Map printing complex configurations

� Map display properties, basemap, operational layers, export, layout options

ArcGIS Server Print Architecture

Overall

Web ReturnPDF file

Makeprint

request

ArcGIS ServerPrint Service

Map service,resources

Browser

Web Services

PDF filerequestwith

specs

ArcGIS Server Print Architecture

Request – Submit Print Job

Web ReturnJob ID

Makerequest

with

ArcGIS ServerPrint Service

Map service,resources

Browser

Web Services

Job IDwithspecs

ArcGIS Server Print Architecture

Request – Get Job Status

Web

ReturnJob Status

&URL to get

Makerequest

With

ArcGIS ServerPrint Service

Map service,resources

Browser

Web Services URL to get

PDF file info

Withknown Job

ID

ArcGIS Server Print Architecture

Request – Get PDF File Info

Web ReturnPDF file

Makerequest

withknown Job ID

ArcGIS ServerPrint Service

Map service,resources

Browser

Web Services

PDF file URL

known Job ID and

file param URL

ArcGIS Server Print Architecture

Request – Get PDF File

Web ReturnPDF file

Makerequest

with

ArcGIS ServerPrint Service

Map service,resources

Browser

Web Services

PDF filewith

PDF file URL

ArcGIS Server Print

Basic vs Advanced� Main difference

� Page size: Basic has limit of 11*17 inches

� Resolution: Advanced uses vector data to generate image

� Coding: Advanced allows you to write your own service using ArcPy

� Advanced print: how?� Prepare map document� Publish it online in ArcGIS Server� Publish it online in ArcGIS Server� ArcPy script

� Accept parameters: web map configs and your own params� Print and export map

� Publish script as geo-processing service

� Demos� Basic print� Advanced print

Comparison SummaryItem

Browser Print

Custom Print Server

MapFish QGIS AGS Basic AGS Advanced

Purpose WYSIWYGHighly

customizedHigh-quality map output

Resolution Control No Limited Yes

Map Service Mashup

No Yes Yes No Yes

Non-map Data Non-map Data Inclusion

No / Limited Yes No

Layout Control Limited Yes Yes

Page Size Control No Limited Yes Yes<= 11 x 17

inchesYes

License No Per libraries used FOSS High

Coding

None orlittle

client-sideeffort

Complex in both server and client sides

Server side: Limited but depends on level of customizationClient side: Web APIs

Conclusion� Need a quick and dirty print from a web page in

WYSIWG fashion� Use browser print

� Need mash-up map with other deliverables� Develop your own print server

� Need high-quality map output� Need high-quality map output� Use ArcGIS server if you have invested already� Consider MapFish if you want to save license cost� Use QGIS Server if you are QGIS user and WMS print is

needed� All above high-quality solutions enable RESTful services, so

support third-party APIs consume printing services

Questions?

Further Reading

� ArcGIS Server high-quality tutorials� Basic:

http://resources.arcgis.com/en/help/main/10.1/index.html#//0154000005z3000000

� Advanced: http://resources.arcgis.com/en/help/main/10.1/index.html#/Tutorial_Advanced_high_quality_web_map_printing_exporting_using_arcpy_mdvanced_high_quality_web_map_printing_exporting_using_arcpy_mapping/0154000005z2000000/

� MapFish Print documents� http://www.mapfish.org/doc/print/

� QGIS Server tutorial� http://hub.qgis.org/projects/quantum-gis/wiki/QGIS_Server_Tutorial

� Light-weight server print – tile stitching method� http://trac.osgeo.org/openlayers/wiki/TileStitchingPrinting

THANK YOU!