1 / 18

Introduction to Geographic Information Systems by Mike Zielinski

Introduction to Geographic Information Systems by Mike Zielinski. Definition of GIS. Stores geographic locations and attributes about the location. Able to add information Edit information Examples terrain information, disease information, tree information. Examples of GIS. Google Earth

PamelaLan
Download Presentation

Introduction to Geographic Information Systems by Mike Zielinski

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Geographic Information SystemsbyMike Zielinski

  2. Definition of GIS • Stores geographic locations and attributes about the location. • Able to add information • Edit information • Examples terrain information, disease information, tree information

  3. Examples of GIS • Google Earth • Google Maps • CGIS – First Computerized GIS • ArcGIS-Current commercial GIS • Wikimapia

  4. History of GIS • First were cave paintings showing where animals where located • First known analytic use was cholera outbreak in London in 1854 when Dr. John Snow used a map to figure out how to stop the outbreak

  5. Demos • Google Maps • Wikimapia

  6. Google code • Need key and a domain to embed in web site • Uses Javascript

  7. Sample Code • <script src="http://maps.google.com/maps?file=api&amp;v=2.x&amp;key=key" type="text/javascript"></script> • <script type="text/javascript"> • var map = null; • vargeocoder = null; • function initialize() { • if (GBrowserIsCompatible()) { • map = new GMap2(document.getElementById("map_canvas")); • map.setCenter(new GLatLng(37.4419, -122.1419), 13); • } • } • </script>

  8. More Code • <body onload="initialize()" onunload="GUnload()"> • <form id="form1" runat="server"> • <div> • <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> • <asp:Button ID="Button1" • runat="server" Text="Button" • onclientclick="showAddress();return false" • UseSubmitBehavior="True" /> • </div> • <br /> • <div id="map_canvas" style="width:300px; height:500px"></div> • </form> • </body>

  9. Geolocating • function showAddress() { • geocoder = new GClientGeocoder(); • var address=document.forms[0].TextBox1.value; • if (geocoder) { • geocoder.getLatLng( • address, • function(point) { • if (!point) { • alert(address + " not found"); • } else { • map.setCenter(point, 13); • var marker = new GMarker(point); • map.addOverlay(marker); • marker.openInfoWindowHtml(address); • } • }

  10. Wikimapia wikimapiaRequestStr = "http://api.wikimapia.org/?function=box&bbox=" + LonMin.Text + "," + LatMin.Text + "," + LonMax.Text + "," + LatMax.Text + "&key=key” The key can be gotten at wikimapia.org/api Returns XML with places in the box Can return other formats like JSON, KML and also gzip it.

  11. XML format <code class="xml"> <?xml version="1.0" encoding="utf-8"?> <?access-control allow="*"?> <folder language="en" version="1.0"> <!-- places folder, language and version --> <place id="22139"> <name>Golden Gate National Recreation Area: Land's End</name> <url>http://wikimapia.org/22139/</url> <!-- original url --> <location> <lon>-122.4997044</lon> <lat>37.7887088</lat> <north>37.788878</north> <south>37.78681</south> <east>-122.494082</east> <west>-122.508352</west> </location> <polygon> <point x="-122.5077081" y="37.7867756"/> <!-- points of polygon x - longitude, y - latitude --> <point x="-122.494082" y="37.78681"/> <point x="-122.4945974" y="37.7880983"/> <point x="-122.496593" y="37.7874539"/> <point x="-122.4973226" y="37.7875896"/> <point x="-122.4997044" y="37.7887088"/> <point x="-122.5002408" y="37.7885053"/> <point x="-122.5024295" y="37.788234"/> <point x="-122.5035238" y="37.7880305"/> <point x="-122.5060344" y="37.7882001"/> <point x="-122.5071502" y="37.7875048"/> <point x="-122.5071502" y="37.7875048"/> <point x="-122.5077081" y="37.7867756"/> </polygon> </place>

  12. XML Parser in C# • XmlReader wikiReader = XmlReader.Create(wikimapiaStream); • while(wikiReader.Read()) { • if (wikiReader.IsStartElement()){ • if (wikiReader.IsEmptyElement) { • name = wikiReader.Name; • } • else{ • name = wikiReader.Name; • wikiReader.Read(); • if (wikiReader.IsStartElement() { • name = wikiReader.Name; • } • content = wikiReader.ReadString(); • if (name == "name"){ • ListBox1.Items.Add(new ListItem(content)); • }

  13. Other Capabilities of Wikimapia • Can Search • Can request URL for a place; need place id gotten from Box

  14. Can be used with Google Maps and Google World • THE KML format is used by Google Earth • The KMZ format which is KML zipped can be used by Google Maps to add information about the area like Google Earth.

  15. Spatial Databases • Can add points, lines, and polygons to the database in SQLServer and MySql • I will talk about MySql but these are standards that have been implemented so should work for other databases.

  16. Spatial Types Point- POINT(12.5 13.1) LineString- LINESTRING( 0 0, 0.5 0.4, 20.1 20.5) Polygon- POLYGON( ………………………..) MULTIPOINT holds many points MULTILINESTRING holds many line strings GEOMETRY can hold any type

  17. Use of types • Create Table PointsAndLines (pt POINT,Line LINESTRING); • Insert Into PointsAndLines Values (GeomFromText(‘(POINT(1 1)’)),…); • Select AsText(pt) From PointsAndLines.

  18. References • Wikipedia-GIS • Wikimapia.org/api • code.google.com/apis/maps • dev.mysql.com

More Related