Massachusetts Institute of Technology
Department of Urban Studies and Planning


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

Lab 8: Experimenting with Geospatial Services

Due by November 18, 2009


Objectives

  1. To understand the layering of data, application tools, web mapping interoperability standards, and web service protocols involved in modern internet GIS applications.
  2. To compare alternative strategies for utilizing geospatial services, from spatial data search with GIS download to direct online use.
  3. To examine a few geospatial services "under the covers" in order to understand the nature and purpose of the URL requests and XML responses between the clients and web services.

Overarching issues

Tips and Tricks

Not all web services and web sites allow you to examine or determine what they are doing behind the scenes. However a significant number, especially those based on open standards, do allow this. Learn to parse URLs yourself (allows you to repurpose sites and services, debug errors)

Basic Rules for URLs and HTTP

1) Transactions are usually "stateless"

All of the information needed for the server to meet client's request is bundled into URL
(Exception: sometimes "cookies" are used to associate state based on a user ID or session ID)

2) Parsing URLs

Overall URL format is protocol:[optional port number]://path/to/resource/scriptname?parameters
A question mark separates path/scriptname from parameters list

&parameter1=blah&parameter2=blah+again

The ampersand separates parameters, and the equals sign sets the assigned value
Spaces are not allowed in URLS, so "+" symbol is substituted
To clarify, paste URL into a text editor and substitute line breaks for question mark and ampersands

3) Example (standard Web Mapping Service or WMS):

http://maps.massgis.state.ma.us/mapaccess/main.jsp?dpi=120&request=GetMap&layers=MHD+Roads&styles=Class&srs=EPSG:26986&bbox=233500,900000,236500,902500&width=640&height=480&format=image/png&service=wms

Becomes

http://maps.massgis.state.ma.us/mapaccess/main.jsp
dpi=120
request=GetMap
layers=MHD+Roads
styles=Class
srs=EPSG:26986
bbox=233500,900000,236500,902500
width=640
height=480
format=image/png
service=wms

Not self-explanatory, but a step in the right direction. Full WMS description can be found here for those interested:
OpenGIS Web Map Service (WMS) Implementation Specification

 

Part I - Exploring Online Mapping Sites

A) Sites Designed Primarily for Online Use

Explore these sites briefly, noting the issues above and last week's lecture notes

EPA's Enviromapper:

http://www.epa.gov/enviro/html/em
Special permission required for access to underlying services (e.g., Oracle account)

U.S. Department of Transportation Federal Highway Administration

What is the annual average daily traffic volume on Mass. Ave?
http://hepgis.fhwa.dot.gov/hepgis_v2/GeneralInfo/Map.aspx

Yes, there is a map on this site that color codes roads based on estimate traffic volume. However, the interface offers limited help capabilities and the right map is hard to find. Do not spend too long hunting for it. Just get a general sense of what the site offers and what you do/do-not like about the site capabilities and user interface.

Other Traffic info sites:

U.S. City Sites

Portland Maps (City of Portland, Oregon) http://www.portlandmaps.com/

Cambridge Maps (City of Cambridge, MA) http://www.cambridgema.gov/GIS/

B) Sites With Data Download Capabilities

The (US) National Map

http://nationalmap.gov/(cover page)
http://nmviewogc.cr.usgs.gov/viewer.htm (direct link to mapping interface)
USGS-led effort at coherent, cross-agency national map layers

USGS

http://seamless.usgs.gov/
Most important US government site for International Users because it provides free access to Global 90m Terrain Data that can be downloaded in a non-poprietary file format, SDTS, that most GIS packages will support.
(SDTS = a Spatial Data Transfer Standard)

University of Maryland Global Land Cover Facility

http://glcf.umiacs.umd.edu/data/ (overview)
http://glcfapp.umiacs.umd.edu:8080/esdi/index.jsp (direct access to mapping interface)

Best place to download free Landsat imagery (warning: huge and unweildy) and global 1km resolution land cover classification. U.S. Government data policy on Landsat has varied over the years. At the moment, access to ETM+ (enhanced thematic mapper plus) is for cost, but older TM and MSS data are available without charge.

Geospatial OneStop (Portal for Federal GIS data)

http://gos2.geodata.gov/wps/portal/gos
Latest version is ESRI-powered under the covers. "Drinking from a fire hose?"

Canadian Geospatial Data Infrastructure (CGDI): http://www.geoconnections.org/en/index.html

'Discovery Portal': http://geodiscover.cgdi.ca/gdp/search?action=searchForm&entryType=productCollection&formType=advanced&language=en

Atlas of Canada: http://atlas.nrcan.gc.ca/site/english/index.html

Other national spatial data infrastructure (SDI) sites

Indian National Data Infrastructure (viewer may be down or slow): http://gisserver.nic.in/nsdiportal/gotogos.jsp

MassGIS

http://mass.gov/mgis
good state agency website for finding and disseminating geospatial data

won recent URISA ESIG award for web services part

Accessible at several levels:

online mapping: http://mass.gov/mgis/mapping.htm
downloadable datasets: http://mass.gov/mgis/database.htm
web services: (discussed in next section)

MIT Libraries - GIS Home page: http://libraries.mit.edu/gis/index.html

We have already used the MIT GeoData Repository tool from inside of ArcMap

Part II - Accessing Geospatial Services from web browsers

A) Using APIs

Yahoo Traffic API using "REST" web URLS (see REST description below)
http://developer.yahoo.com/traffic/rest/V1/index.html

What is the current traffic on Mass Ave at MIT?

http://local.yahooapis.com/MapsService/V1/trafficData?appid=YdnDemo&street=77+Massachusetts+Ave&city=Cambridge&state=MA&include_map=1
Your browser will not display the results on a map but will just list the XML that is returned. This is an example of a spatial query that return a non-spatial result. The results contain XML-wrapped text and X,Y locations explaining traffic events near the address sent in the URL. Examine the tags and content. With the 'include_map' flag set to one, the URL for a map of the area is included in the results. Cut-and-paste the URL for the map into another browser window.

B) Custom Web User Interfaces backed by web services

United Nations Environment Programme
http://geodata.grid.unep.ch/

Notes. WMS Services / UMN Mapserver software behind the scenes. Most data at general national levels only, some regional data sets. Lots of drill-down required to navigate the interface and generate specific maps and data tables. A listing of their web services is at: http://geodata.grid.unep.ch/webservices/

C) ESRI ArcGIS Server

http://resources.esri.com/help/9.3/arcgisserver/apis/flex/samples/index.html

What it does: General web client interface backed by ArcGIS Server. Also note "map types" and layer-level user control exposed.

How it works: web Services inside Flash-based Client inside browser

Which data are available and how much do they cost? (Some public services, other per hit)

 

Part III - Accessing ArcWeb and WMS Services (from ArcMap or ArcExplorer)

 

A) Finding WMS Services

Web-search approaches:

Use government web sites such as GOS above, or WMS client software sites

Index of OGC WMS Servers

http://www.skylab-mobilesystems.com/en/wms_serverlist.html

MassGIS: http://mass.gov/mgis

B) ESRI's ArcGIS Online:

ESRI's ArcGIS Online: http://www.esri.com/software/arcgis/arcgisonline/map-services.html

Access from ArcMap

The free map viewer from ESRI, ArcExplorer v. 9.2, can access ArcGIS Online Resource (but not OGC-compliant WMS services)

Accessing WMS services from ArcMap


Part IV - "Mashups" and APIs

A) General Mapping Web Site (Mostly Commercial Advertising-Supported - all now with APIs)


Google Maps

http://maps.google.com/
Note "REST" interface (client side interface actions handled by Javascript, partial page refresh without a "submit" button)

http://www.google.com/apis/maps/

Microsoft Virtual Earth

http://www.bing.com/maps/

Note (with free account) ability to sketch, and share simple sketch (with labels but not attributes, non-standard format)

Yahoo Maps (Beta)

http://maps.yahoo.com/beta/index.php

Note live traffic feed option, overview map leads full map for zoom interface preview. Also, mouse rollover on legend highlights search results dynamically.

B) "Mashups" (standard 2d maps + Javascript programming for interfaces or dynamic overlays)

Boston.com election contribution website

http://www.boston.com/news/special/bigarticles/campaign_finance/page2.html?p1=email_to_a_friend

Live 'mashup' webpage (for Back Bay):

http://boston.faneuilmedia2.com/gov/detail_map.html?from=top&zip=02116&z=13

Note: you can 'pan' the map or click on dots for further info

How was it done socially/technically? Overlay/identify entries in local election contribution database maintained by consultant (Faneuil Media, Inc.)

Looking under the covers

"View source" in your browser. Look for call to google with machine/directory-specific Key:

http://maps.google.com/maps?file=api&v=2.60&key=AB...

"REST" is a programming technique which uses client side javascript to interact with the server without full page refreshed. All mapping APIs are moving towards this, pressured by Google maps success. REST stands for Representational State Transfer and involves ways of exchanging information between client and server regarding the state of the client so that every exchange between client and server does not require a complete reconstruction of the client-viewed webpage. AJAX programming is one strategy for enabling complex client-side actions using new information from the server without having to rewrite all of the client webpage. AJAX stands for Asymmetric Javascript and Xml and uses javascript to send URL requests, parse the XML-tagged responses, and use the returned information to rewrite parts of the client-side browser window.

Optional Note: hard to get beyond "push pins" user interfaces

Moving Past Push Pins

Part V: Lab Assignment Options

Pick any one of the 4 options below along with the PDF for the map in Part III-B

Option A: Build Your Own U.S. Case Study Using Downloaded GIS Data

1. Select a location in the U.S. which interests you. Using the national map or seemless.usgs.gov, find and download:

National Elevation Data (NED 1/9)
Land Use / Land Cover (NLCD)
Transportation (varies)
Hydrology (varies)

2. Note the interface or data problems you find, if any.

3. Turn in both a map illustrating your area, and a brief paragraph describing the user experience. (Those of you actually wanting to use case study data later in the term should save it somewhere for later.)

Option B: Build an International Case Study

  1. Pick an international site of interest.
  2. Using USGS's "seamless" web site, find and download the SDTS terrain for the area, and any other relevant data.
  3. Using the University of Maryland's site, find which Landsat imagery is available for free for the area. Also, download the global 1km land use information for the area if available. (No need to actually download a full Landsat image at this time - just grab the preview image for now).
  4. Using Google Maps or another online GIS, screen-grab imagery for your area.
  5. Document what you found, what you didn't find, and your overall user experience in about a paragraph. (Those of you actually wanting to use case study data later in the term should save it somewhere for later.


Option C: Build Your Own Map Using Web Maps (in Browser or in ArcGIS)

  1. Same idea as in options above, different technical approach. Try using web mapping to create a map for particular area of interest. Depending on the interfaces used, you may actually need to do a screen capture to turn in, rather than a print.
  2. Try to find and use at least one of ESRI's ArcWeb Services, and one OGC Web Mapping Service (WMS).
  3. Document at a paragraph level your user experience, including interface and data issues.

Option D: Critical Analysis

Web services can be evaluated from the point of view of a consumer, from that of a producer, or from that of a policymaker. Pick one of these points of view, and using the sites above as examples, describe what you find to be the "state of the art." Address what works, what are best practices, what doesn't work and what you think is required.

Write up approximately 1 - 2 pages of text, with illustrated examples

Please do any one of the 4 Lab Assignment Options and submit them along with the PDF-formatted map to Stella. The assignment is due on Monday, November 18, 2009.


Created October, 2006, by Michael Flaxman and Joseph Ferreira based on exercise developed by Joseph Ferreira for use in the URISA Internet GIS workshop taught by Zhong-Ren Peng and Joseph Ferreira.

Last modified 8 December 2009 [jf]

Back to the 11.520 Home Page.