Massachusetts Institute of Technology - Department of Urban Studies and Planning

11.188: Urban Planning and Social Science Laboratory 
11.520: A Workshop on Geographic Information Systems

Web Services and Mapping APIs

 

April 7, 2021, Joseph Ferreira

 


Administrative

  • Lab #5 due today
  • Next draft of Project Proposal - due Monday, April 12
  • Homework #3 is due next Wednesday (April 14)

Today

  • Introduction to Internet GIS and GeoSpatial Web Services
    • What do we mean by 'web mapping' or 'internet GIS'?
    • Distinguish between map publication, single purpose apps, and geoprocessing (interactive spatial analysis)
    • Decompose into server and client components
  • Demonstrate use of web services
    • MassGIS web mapping services (WMS)
    • QGIS use of web mapping services
    • Online tutorials for Web Mapping and Geoprocessing Services 



Internet GIS and GeoSpatial Web Services

  • Introduction to Internet GIS and GeoSpatial Web Services
    • What do we mean by 'web mapping' or 'internet GIS'?
      • Yahoo Maps, Google Earth, Mapquest, etc. - are these GIS applications?
      • What about map 'mashups' on top of Google Maps and Google Earth?
      • What about Android and iPhone maps and navigation tools?
    • Distinguish between map publication, single purpose apps, and geoprocessing (interactive spatial analysis)
  • Decompose into server and client components
    • Recognize pros and cons of client/server workload balancing
    • Recognize utility of open standards for interoperable geospatial web services
      • In this case, the web mapping service (WMS) protocol from the Open Geospatial Consortium (https://www.ogc.org/)
    • Enter these MassGIS URLs in a web browser
http://giswebservices.massgis.state.ma.us/geoserver/wms?dpi=120&request=GetMap&layers=GISDATA.EOTMAJROADS_ARC&srs=EPSG:4326&bbox=-71.1,42.35,-71.0,42.37&width=1000&height=300&format=image/png&service=wms&transparent=true
MassGIS-web-mapping-services-roads1
http://giswebservices.massgis.state.ma.us/geoserver/wms?dpi=120&request=GetMap&layers=GISDATA.MBTABUSROUTES_ARC&srs=EPSG:4326&bbox=-71.1,42.35,-71.0,42.37&width=1000&height=300&format=image/png&service=wms&transparent=true
MassGIS-web-mapping-services-busroutes
      • Do you recognize the meaning of the parameters? Play with the values...
        • http://giswebservices.massgis.state.ma.us/geoserver/wms?
        • dpi=120&
        • request=GetMap&
        • layers=GISDATA.EOTMAJROADS_ARC&
        • srs=EPSG:4326&
        • bbox=-71.1,42.35,-71.0,42.37&
        • width=1000&
        • height=300&
        • format=image/png&
        • service=wms&
        • transparent=true
      • Note that some services only produce maps at particular scales
        • Otherwise, get xml-tagged error message
      • MassGIS web services homepage: https://wiki.state.ma.us/display/massgis/Overview+of+MassGIS+Web+Mapping+Services+and+Applications

  • Demonstrate use of MassGIS web services from within QGIS

    • In QGIS, choose 'Layer / Add Layer / Add WMS/WMTS layer'
    • Click the 'New' tab to open 'Create a New WMS/WMTS Connection'
      • Formulate a Name for the layer that you will add, e.g. 'MassGIS web services'
      • URL = http://giswebservices.massgis.state.ma.us/geoserver/wms?
      • No authentication is required and other defaults will be fine: Click 'OK'
    • Click the 'Connect' tab to open the URL
      • The URL triggers a 'get capabilities' response from the server
      • The response - listing hundreds of layers - is summarized in the window
      • Find and highlight the layer with ID=672 and then click 'Add' and then 'Close'
    MassGIS major roads web service
    • The MassGIS web server will generate an image properly sized and georeferenced for your QGIS map window showing the major roads with standard symbols in a PNG format that has a transparent background so it can overlay your map.
MassGIS web service for major roads

Integrating web services within web pages:


Deeper integration of geoprocessing services within web pages:

create table c2000inc as
(select g."LOGRECNO", e."P085001", e."P085002", e."P085003", g."STATE"||g."COUNTY"||g."TRACT"||g."BLKGRP" AS blkkey from census2k.mageo g,  census2k.ma00007 e where g."LOGRECNO" = e."LOGRECNO" and g."SUMLEV" = '150');



Created by Joseph Ferreira and Michael Flaxman, 2006-2007
Last modified 19 March 20158 Joe Ferreira
Back to the 11.520 Home Page.
Back to the CRON Home Page.