nr 422: maps on the web jim graham spring 2010. computer networks 2 or more computers connected...

22
NR 422: Maps on the web Jim Graham Spring 2010

Upload: reynold-stone

Post on 17-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: NR 422: Maps on the web Jim Graham Spring 2010. Computer Networks 2 or more computers connected together Typically a: –Client: requests and receives data

NR 422: Maps on the web

Jim Graham

Spring 2010

Page 2: NR 422: Maps on the web Jim Graham Spring 2010. Computer Networks 2 or more computers connected together Typically a: –Client: requests and receives data

Computer Networks

• 2 or more computers connected together

• Typically a:– Client: requests and receives data– Server: receives requests and serves data

Page 3: NR 422: Maps on the web Jim Graham Spring 2010. Computer Networks 2 or more computers connected together Typically a: –Client: requests and receives data

Requesting a Page

1. Client sends an http request with a URL to a server

2. Server find the file based on the URL and returns it

3. Can also request: mpeg, jpeg, gif, etc.

HTML Page

Request with URL

Page 4: NR 422: Maps on the web Jim Graham Spring 2010. Computer Networks 2 or more computers connected together Typically a: –Client: requests and receives data

Dissecting a URL

• http://www.google.com– http: hypertext transfer protocol– www.google.com = server address

• Important: You need a server to put data on the web

Page 5: NR 422: Maps on the web Jim Graham Spring 2010. Computer Networks 2 or more computers connected together Typically a: –Client: requests and receives data

How Web Servers Work

Browser

Client Server

Web Server

HTML File

Image File

HTML File

Image File

Internet

URL

Page 6: NR 422: Maps on the web Jim Graham Spring 2010. Computer Networks 2 or more computers connected together Typically a: –Client: requests and receives data

Dissecting URLs

• http://www.niiss.org/cwis438/websites/niiss/home.php?WebSiteID=1

• /cwis438/websites/niiss/home.php– File to load

• ?WebsiteID=1– Parameter

• Parameters can be hidden

Page 7: NR 422: Maps on the web Jim Graham Spring 2010. Computer Networks 2 or more computers connected together Typically a: –Client: requests and receives data

GIS on the Web

• PDF Files

• HTML files with image maps

• GIS Web Servers

• Next Generation:– MapQuest– GoogleMaps

• GoogleEarth (Internet, not web-based)

Page 8: NR 422: Maps on the web Jim Graham Spring 2010. Computer Networks 2 or more computers connected together Typically a: –Client: requests and receives data

Portable Document Format

• Acrobat Writer lets you write PDF files from virtually any application by “printing” to a PDF

• Acrobat Pro will maintain links

• Maintains print quality

Page 9: NR 422: Maps on the web Jim Graham Spring 2010. Computer Networks 2 or more computers connected together Typically a: –Client: requests and receives data

Image Maps

• Embedded in a web page (HTML)

• Fixed array of coordinates for known map

Page 10: NR 422: Maps on the web Jim Graham Spring 2010. Computer Networks 2 or more computers connected together Typically a: –Client: requests and receives data

File Formats

• PNG & GIF– Spot Color / Categorical

• JPEG– Continuous tone

• Keep to about 500 x 500 pixels– Larger rasters take much longer to download

Page 11: NR 422: Maps on the web Jim Graham Spring 2010. Computer Networks 2 or more computers connected together Typically a: –Client: requests and receives data

Web Formats & Languages

• Direct Browser Support:– HTML– JavaScript– Images: GIF, PNG, JPEG

• Plug-ins:– Flash– PDF

• AJAX (JavaScript to Server)– XML

Page 12: NR 422: Maps on the web Jim Graham Spring 2010. Computer Networks 2 or more computers connected together Typically a: –Client: requests and receives data

XML-Type Languages

• Extensible Markup Language

• Single tag: <tag />

• Tag with attributes: <name attribute=‘value’ />

• Tag with content:<name>

<contentname/>

</name>

• Includes: HTML, KML, and many more

Page 13: NR 422: Maps on the web Jim Graham Spring 2010. Computer Networks 2 or more computers connected together Typically a: –Client: requests and receives data

HTML

• Hyper Text Markup Language<html>

<head>

<title>This is my page</title>

</head>

<body>

Some text that will appear on the page

</body>

</html>

Page 14: NR 422: Maps on the web Jim Graham Spring 2010. Computer Networks 2 or more computers connected together Typically a: –Client: requests and receives data

Image Links

<img src=‘MyImage.png’>

<img border=‘0’ src=‘MyImage.png>

Page 15: NR 422: Maps on the web Jim Graham Spring 2010. Computer Networks 2 or more computers connected together Typically a: –Client: requests and receives data

Hyperlinks

<a href=‘www.google.com’>Google</a>

<a href=‘WebPage.html’>My Page</a>

<a href=‘LargeImage.png’><img src=‘SmallImage.png’>

</a>

Page 16: NR 422: Maps on the web Jim Graham Spring 2010. Computer Networks 2 or more computers connected together Typically a: –Client: requests and receives data

Can also have…

• Paragraphs <p>

• Horizontal rules <hr>

• Tables <table><tr><td>data</td></tr></table>

• Divs (boxes) <div>

• Headings: <h1>Heading</h1>

• Text with:– Bold <b>– Italic <i>– And “Styles” with much more

Page 17: NR 422: Maps on the web Jim Graham Spring 2010. Computer Networks 2 or more computers connected together Typically a: –Client: requests and receives data

MacroMedia DreamWeaver

• Now part of Adobe CS

• HTML Editor

• Excellent tutorials

• Makes HTML editing similar to MS-Word

• Allows “publishing” pages to the web

• Work flow:– Edit web pages locally– Review in browser– Upload/publish to a server

Page 18: NR 422: Maps on the web Jim Graham Spring 2010. Computer Networks 2 or more computers connected together Typically a: –Client: requests and receives data

Image Maps

• Create background image in ArcGIS– Create a map that looks good on the screen– Export or Screen Capture

• Define polygonal areas as “image maps” in DreamWeaver– Circles for points– Simple polygons for polygons– Polygons for polylines?

• Good for 10 to 20 areas

Page 19: NR 422: Maps on the web Jim Graham Spring 2010. Computer Networks 2 or more computers connected together Typically a: –Client: requests and receives data

GIS Web Servers (old)• ArcIMS

– Expensive– Operating Systems

• MS-Windows

– Static Maps• Shapefiles• TIFF

– Languages• ASP

– Hard to support

• MapServer– Free (OpenSource)– Operating Systems

• UNIX• MS-Windows

– Documentation problems

– Static Maps• Shapefiles• TIFF

– Languages:• PHP

– Really hard to support

Page 20: NR 422: Maps on the web Jim Graham Spring 2010. Computer Networks 2 or more computers connected together Typically a: –Client: requests and receives data

GIS Web Servers• ArcGIS Server

– Expensive– Slow– Buggy (reboot each

night)

• GeoServer– Free– Client: OpenLayers– ?

Page 21: NR 422: Maps on the web Jim Graham Spring 2010. Computer Networks 2 or more computers connected together Typically a: –Client: requests and receives data

Next Generation

• MapQuest– Server and client-side interfaces

• GoogleMaps– Overlay data on GoogleMap backgrounds– Client-side programming in JavaScript

• Requires programming

• NR 621: Designing GIS Systems

Page 22: NR 422: Maps on the web Jim Graham Spring 2010. Computer Networks 2 or more computers connected together Typically a: –Client: requests and receives data

Latest Developments

• Crime Spotters– http://sanfrancisco.crimespotting.org/

• Cloud Made:– http://maps.cloudmade.com/

• Open Street Map– http://www.openstreetmap.org/

• EROS EarthExplorer– http://edcsns17.cr.usgs.gov/EarthExplorer/