Web Mapping? Why? How?: Isn't Google Enough?
Web Mapping? Why? How?: Isn't Google Enough?
Jo Cook Senior IT Support and Development Oxford Archaeology/OADigital j.cook@thehumanjourney.net +44 (0)1524 880212
Your Data
Must be:
Map Servers
Minnesota Mapserver
Download windows binaries from: http://maptools.org/ms4w/ and everything else from: http://mapserver.gis.umn.edu/download/current/
Minnesota Mapserver
Check it's working by entering the following URL in firefox: http://www.maths.lancs.ac.uk/cgi-bin/mapserv?
Geoserver
http://geoserver.org/
Mapserver Demos
Try the demos here: http://www.maths.lancs.ac.uk/~rowlings/MapServer/workshop-5.0/
WMS
A GetCapabilities request: http://wms.jpl.nasa.gov/wms.cgi?request=GetCapabilities
<?xml version='1.0' encoding="UTF-8" standalone="no" ?> <!DOCTYPE WMT_MS_Capabilities SYSTEM "http://wms.jpl.nasa.gov/WMS_MS_Capabilities.dtd" [ <! ELEMENT VendorSpecificCapabilities EMPTY> ]> <WMT_MS_Capabilities version="1.1.1"> <Service> <Name>OGC:WMS</Name> <Title>JPL Global Imagery Service</Title> <Abstract>WMS Server maintained by JPL, worldwide satellite imagery.</Abstract>
...
WMS
A GetMap request: http://wms.jpl.nasa.gov/wms.cgi? request=GetMap &service=wms &version=1.1.1 &srs=EPSG:4326 &format=image/jpeg &styles= &bbox=-180, -60, 180, 84 &width=600 &height=300 &layers=global_mosaic
WFS
A GetCapabilities Request: http://map.ns.ec.gc.ca/envdat/map.aspx? service=WFS&version=1.0.0&request=GetCapabilities A GetFeature Request: http://map.ns.ec.gc.ca/envdat/map.aspx? service=WFS &version=1.0.0 &request=GetFeature &typename=envirodat
MAP ... WEB ... METADATA ... "wfs_title" "My first wfs server" "wfs_srs" "EPSG:4326" "wfs_onlineresource" "http://www.maths.lancs.ac.uk/cgibin/mapserv?map=/web/home/cookj1/test_wfs.map END END LAYER ... DUMP TRUE METADATA "wfs_title" "My first wfs layer" "gml_featureid" "cat" "gml_include_items" "all" END
...
function init() { map = new OpenLayers.Map('map', options); map.addControl(new OpenLayers.Control.LayerSwitcher()); var gsat = new OpenLayers.Layer.Google( "Google Satellite", {type: G_SATELLITE_MAP} ); var wms = new OpenLayers.Layer.WMS( "Alaska", "http://www.maths.lancs.ac.uk/cgi-bin/mapserv?map=/web/home/cookj1/test_wms.map", {'layers': 'alaska', 'transparent': true}, {reproject: true} ); map.addLayers([gsat, wms]); } map.setCenter(new OpenLayers.LonLat(-152, 67), 3);
WFS Layers
Require extra configuration of the server to accept external wfs requests (see http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#ProxyHost): In general, uses the same set of parameters as WMS, eg: var wfs = new OpenLayers.Layer.WFS( "Alaska", "http://www.maths.lancs.ac.uk/cgi-bin/mapserv? map=/web/home/cookj1/test_wfs.map", {typename: "alaska"} ); BUT: WFS layers need reprojecting to overlay correctly on commercial map layers (you may need to edit the projection file that mapserver uses- see http://crschmidt.net/~crschmidt/spherical_mercator.html)
OpenLayers Examples
Try them out at: http://www.maths.lancs.ac.uk/ol/examples
Cataloguing
(Or what to do with all this fancy web-data now you've got it)
Geonetwork
Java-based geospatial cataloguing system Download at: http://geonetwork-opensource.org/
References
Web Mapping Illustrated (O'Reilly) by Tyler Mitchell ISBN 0-596-00865-1 Mapserver main website: http://mapserver.gis.umn.edu/ Mapserver 5 tutorial: http://biometry.gis.umn.edu/tutorial/ Geoserver website: http://geoserver.org/ Openlayers website: http://openlayers.org/ Introduction to Openlayers (Workshop, FOSS4G 2008): http://workshops.opengeo.org/openlayers/intro/doc/ OGC Standards (for WMS/WFS etc): http://www.opengeospatial.org/standards Geonetwork website: http://geonetwork-opensource.org/
Jo Cook Senior IT Support and Development Oxford Archaeology/OADigital j.cook@thehumanjourney.net +44 (0)1524 880212
This work is licenced under the Creative Commons Attribution-Share Alike 2.0 UK: England & Wales License. To view a copy of this licence, visit http://creativecommons.org/licenses/by-sa/2.0/uk/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California 94105, USA.