Free and Open Source Web Mapping Prof. Maria Antonia Brovelli, Dr. Eng. Giorgio Zamboni Politecnico di Milano – Como Campus – Italy Geospatial Web 2

Users

INTERNET

Data

Processes

Catalogues Web Mapping 3

Web Map and Geodata Servers Web Map and Geodata Clients

INTERNET Map mashingup 4

Servers Clients

INTERNE T Interoperability / Standardization 5

• Open and interoperable components • Interchangeable data • De jure standard: technical instruction set by national and/or international standardization organizations (ISO/OGC/National standards)

• De facto standard: technical instruction used by a noteworthy number of people and/or organizations. OGC Web Service (OWS) 6

• XML (eXtensible Markup Language) is used for the definition and the description of applications. The communication is based (in the majority of cases) on the HTTP protocol. Because of using XML, Web Services are platform and OSindependent. • The functioning of OWS (OGC Web Services) can be described in four steps : • the client contacts the server and queries it about its functionalities • the server sends back to the client an XML document containing the functionalities of the supported service • the client asks the server for data • the server provides the data as requested WMS Example 7

Client Server

getCapabilities

XML Service Metadata

C B Map A A MapMap B B getMap Map C

Map OGC Web Map and Geodata Services 8

• Data Delivery: • WMS : service that generates maps and makes them available as images or as a series of graphical elements • WFS : service that generates geographic entities or features . If the service is “transaction” (WFST), data manipulation is allowed • WCS : service that generates geospatial coverages, that are geospatial information representing spacevarying phenomena (fields) OGC Web Map and Geodata Services 9

• Data formats: • SFS : Simple Feature Standard • GML : Geography Markup Language • KML : Keyhole Markup Language • Data search: • CSW : Catalogue Service • WFSG: Gazetteer Service • Other: • WPS : Web Processing Service • CTS : Coordinate Transformation Service • WTS : Web Terrain Service • SLD : Styled Layer Descriptor • WMC : Web Map Context FOSS Web Map Geodata Servers (1) 10

Birth: mid ‘90 2001 License: MIT GPL Web: www.mapserver.org www.geoserver.org OGC: WMS, WFS(T), WCS, WMS, WFS(T), WCS, GML, SLD, WMC GML, KML, SLD Language: C Java Operating Windows, , Platform System: MacOSX independent FOSS Web Map Geodata Servers (2) 11

Birth: 2004 2005 License: LGPL LGPL Web: www.mapguide.osgeo.org wiki.deegree.org OGC: WMS, WFS WMS, WFS(T), WCS, GML, CSW, WFSG, WPS, WTS, SLD, WMC Language: C++ Java Operating Windows, Linux Platform System: independent Web Map and Geodata Clients (1) 12

• They are interactive viewers in the most of cases simply running in a web browser (Mozilla Firefox, Opera, Internet Explorer, etc.). Sometimes, depending on the technology adopted, plugins, i.e. pieces of providing specific functionalities not available in the simple browser interaction, are requested. • New generation web map and geodata clients are completely independent from the server application that lies behind them : they communicate indifferently by means of OGC open protocols with MapServer, GeoServer, MapGuide, deegree, etc. • By means of this kind of applications, which renders maps from Web Map and Geodata Services, users can navigate maps, zoom in, zoom out, pan, click and query, turn layers on and off or add more maps. They can additionally edit map features (if data are served by a Transactional Web Feature Service), build their own maps, contacting different services on different machines and save them to be used at any time or to be shared. 13 An example 13

Scale

Main map

Legenda

Reference map

Scalebar Different languages 14 An example 14

ZoomZoom to Selected fullForward extentBack IdentifyToolSelect Tip Zoom in/out Add ZoomPointZoomRefresh Pan ofoutMeasure inInterest Map 15 An example 15

Data stored in the WMSWFSlocal serverServicesServices (e.g.: shapefiles, rasters, MapInfo tables and all the other formats supported by MapServer) 16 An example 16

Searching tools:

 Searchitem

 Identify

 Select

 Tool Tip

: Web Map and Geodata Clients (2) 17

Web mapping client comparison (German Carrillo, 2010 ) Web Map and Geodata Clients (3) 18

• Previous products are nicely presented for comparison in “Web mapping client comparison v.4” by German Carrillo (may 2010) (*) • The comparison is divided in three parts: • general description: license, origin country, origin company or entity, documentation (languages, formats, level [users, developers]), OSGeo support, comments ; • technical features: source code language, API language, OGC services supported, support of tilebased maps, need of proprietary plugins, inclusion of metadata component, mailing lists; • links of interest: screenshot, current version, official website, documentation, features/roadmap, gallery/demo.

(*) http://geotux.tuxfamily.org/index.php?option=com_myblog&task=view&id=257&Itemid=59&lang=en Desktop Map and Geodata Clients (1) 19

GRASS Quantum GIS

Birth: 1982 2002 License: GPL GPL Web: grass.osgeo.org www.qgis.org OGC: WMS, WFS, GML, WMS, WFS(T), SFS, WPS GML, KML Language: CC Operating Windows, Linux, Windows, Linux, System: MacOSX MacOSX Desktop Map and Geodata Clients (2) 20

gvSIG OpenJump

Birth: 2003 2002 License: GPL GPL Web: www.gvsig.org www.openjump.org OGC: WMS, WFS(G), WMS, WFS(T), SFS, WCS, GML, KML, GML, WPS, SLD CSW, SLD Language: Java Java Operating Platform Platform System: independent independent Desktop Map and Geodata Clients (3) 21

uDig MapWindow Birth: 2004 2004 License: Mozilla LGPL Web: www.mapwindow.org udig.refractions.net OGC: WMS, WFS WMS, WFS(T), SFS, GML, WPS, SLD Language: C#, C++, Visual Basic, Java .NET Operating MS Windows Platform System: independent MultiD Map and Geodata Clients (1) 22

• Currently the most of the Internet viewers are bidimensional (horizontal). • : a 3D representation of the Earth Advantages: • more immersive effects • intuitive interactions • ability to freely move around in the virtual environment by changing the viewing angle and location • capability of representing many different views on the surface of the Earth MultiD Map and Geodata Clients (2) 23

NASA World QGIS 3D Wind Java SDK

OssimPlanet Earth3D deegree 3D

Norkart Virtual osgEarth gvSIG 3D Globe

Comparison of Open Source Virtual Globes presented at FOSS4G2010 Barcelona by Mathias Walker, Pirmin Kalberer (http://2010.foss4g.org/presentations/3690.pdf) NASA World Wind (Java SDK) 24

• SDK (Software Development Kit) • Virtual Globe • NASA Open Source Agreement License • Multi Platform ( Java: “Write Once, Run AnyWhere” ) • JOGL (Java OpenGL 3D Engine) • Client – WMS Server (v0.6 nightly builds) • Web: worldwind.arc.nasa.gov/java WWJ SDK Architecture (1) 25

Main interfaces: • Globe: represents the planet's shape and terrain (ellipsoid and terrain) • Layer: overlaps geospatial information to the Globe (images, icons, markers, 3D objects, ) • Model: combines the Globe and Layers • SceneController: controls the rendering of the Model • View: controls the user's view of the Model (location – camera settings, ) WWJ SDK Architecture (2) 26

Application Window Environment (Swing, AWT, etc.)

WorldWindow

Scene Controller Notifier (Global)

Configuration (Global) View Frame Controller Canvas

Model Globe Layer Web

Tessellator Cache WWJ SDK Architecture (3) 27

• Servers NASA – USGS ( U.S. Geological Survey ): • DTM: • SRTM30Plus (30 arcsec ~900m), SRTM3 v2 v4.1 (3 arcsec, ~90m), ASTER (~30m), USGS NED (~30m, ~10m US only) • IMAGERY: • BlueMarble (BMNG 1Km), i3Landsat (15m), USGS OrthoTopo (1m US only), Urban Area Ortho (0.5 – 0.25m selected US city) WWJ SDK Architecture (4) 28

• Microsoft has allowed World Wind to incorporate Virtual Earth high resolution data for non commercial use. • It is possible to take from a whichever OGC compliant WMS server the georeferenced images (and maps) we want to project on the globe . • It is possible to take from specific WMSs, whose code is made available by NASA, the digital elevation models we want to superimpose to the geoid model implemented within the platform. Construction of the scenario 3½D Model (1) 29

• Projection on the Earth surface (2 ½D) of time varying thematic maps

THEMATIC IMAGERY MAPS (2D) WMS 2½D WMS SERVER SERVER Remote Remote WWJ CLIENT Database 3½D Database Model WMS SERVER Map Map Map (WWJ0.6) t=t 0 t=t 1 t=t 2 Scenario DTM WWJ SDK time Remote Database 3½D Model (2) 30

CustomOriginalCustom orthophoto dataset orthophotoCustom –+ orthophoto (Landsati7DTM + thematical + thematical + SRTM) map map 3½D Model (3) 31

Thematical map: t = t 01234 4D Model Irregular shapes (1) 32

E DB Attributes D (mdb, xml, )

C

A B

SHP FILE SHP Geometry Natural domain (lake) WWJ CLIENT Loader Builder 3D Thematical Maps

E C

B

D A DB Attributes SHP FILE (mdb, xml, ) Artificial domain (building) 4D Model Irregular shapes (2) 33

A

t0 t1 t2 t3 tN t

Feature attributes 3D Thematical Maps

A(t 0) A(t 1) A(t 2) A(t 3) A() A(t N) 4D Model Irregular shapes (3) 34

3D MODEL (SHP) IMAGERY WEB 3D WMS SERVER SERVER ATTRIBUTES (DB) Remote WWJCLIENT Database Remote 4D Database Model

WMS SERVER

Attribute Attribute Attribute t=t t=t t=t 0 1 2 Scenario

DTM Remote WWJ SDK Database time 4D Model Irregular shapes (4) 35

Attribute:Attribute:Mean Incentive Energy Incentive Olbia– Thematized– Classification –Buildings Thematized by Color by by Color Colorand Height Doxel Model (1) 36

3D VARIABLES

Geometry NetCDF WWJCLIENT Loader Builder

DIMENSIONS ATTRIBUTES v VOXEL (3D) units + (1D) time sources COORDINATES = DOXEL (4D) ( Dynamic 4D Thematic Map v(t2)(t0)(t1)(t3) voxel ) NetCDF FILE Doxel Model (2) 37

3D MODEL IMAGERY + WEB 3D WMS ATTRIBUTES SERVER SERVER (NetCDF) Remote WWJCLIENT Database Remote 4D Database Model

WMS SERVER

Attribute Attribute Attribute t=t t=t t=t 0 1 2 Scenario

DTM Remote WWJ SDK Database time Doxel Model (3) 38

v(t)

0 1 2 3 N

no v v(t 0) v(t 1) v(t 2) v(t 3) data v(t N)

t0 t1 t2 t3 tN t Doxel Model (4) 39

• Interactions with the 3D model

Attribute Value

t LATITUDE SECTION LONGITUDE SECTION

INFO

HORIZONTAL SECTION GET ATTRIBUTE INFO ESTWA (1) 40

(Environment Space and Time Web Analyzer)

ESTWA

ESTWA2D ESTWA3D 3D Geometry Builder

NetCDF data

•Metadata Viewer Local •4D Viewer •2D Viewer cache (WWJ engine) •Data Filter •2D Profile viewer http

Remote Server NetCDF Texture DTM data ESTWA (2) 41

ESTWA2D: METADATA VIEWER ESTWA2D: DATA FILTER

ESTWA3D