Thursday, November 21, 2013

GEOG 445 Lab 6 VGI


Goal and Background

This lab is an introduction to VGI, or volunteered geographic information. VGI is a crowdsourcing operation that allows the general public to collect and upload geo-locations and their associated attribute information to a web GIS application. This lab will teach someone how to develop a web GIS VGI application that can be used by the general public to upload geo-locational information for a number of phenomena.

Methods

The first section of this lab addresses the creation of a map document that will later be used to publish services to an online server. In order to set domains for the feature classes, the properties must be edited within the geodatabase for the VGI application. This is when coded value domains can be set, for example a 0 representing a red fire hydrant and a 1 representing a yellow fire hydrant. The VGI application in this lab will display 3 feature classes each with domains including fire hydrants (red or yellow), sidewalks (very good or needs repair) and green spaces (lush or needs fixing). While creating the feature classes, each one can be configured to use the corresponding coded value domain and include user comments during data publication.


In order to make our feature classes cartographically pleasing, we will customize the symbology of each coded value domain. The image below shows how each feature class will appear on the completed VGI application.




After a simple basemap is added, the feature classes are ready to be tested within the map document. For the purposes of the lab, we placed one of each domain onto the basemap as shown below.




Everything looks good so far, so the next step is to connect to ArcGIS server publisher. Once connected, all nonessential layers can be removed from the map document and the VGI features can be shared as a service. Within the service editor, it is crucial to include “Feature Access” as a capability. This is what will allow end users to edit and add data to the application. Once the feature has been published, it can be referenced within a JavaScript code and displayed in the application.

For this lab, we will be editing an existing VGI application instead of creating a new one. The existing application is based in Washington D.C. and was created for the collection of point, line, and polygon hazard features. The first step is to locate the coordinates within the JavaScript code and replace the Washington D.C. coordinates with Eau Claire coordinates. Next, all of the point, line, and polygon feature URLs will be replaced by the URLs for the services that we created on the server. After changing the title to suit this lab, the application is up and running.





The final portion of this lab had each student construct his or her own VGI application. I chose to build an application that mapped out the emergency telephones located on the University of Wisconsin- Eau Claire campus. The end user can specify if each telephone located in a well lit or dark area during night hours, and include any other comments if necessary (up to 80 characters). The only challenge encountered during this portion of the lab was attempting to use an aerial image for a basemap instead of a topographic map. The topographic map works fine but the UWEC campus is not detailed within the basemap and it may be difficult for end-users to find the desired location for their data.




Tuesday, November 5, 2013

GEOG.455 LAB 5 ArcGIS API for JavaScript


Goal and Background

The purpose of this lab is to learn how to use the ArcGIS JavaScript API to embed GIS services into a website. GIS services will be embedded to display and interact with web maps. GIS applications will also be modified and applied to different study areas and methods. After this lab, students should become familiar with the structure of an html file, embedding JavaScript into html and their associated cascading style sheets, and the use of JavaScript API to create web applications.

Methods

The introduction of this lab demonstrates the creation of a basic application. The first step is to set up a basic HTML document. The block of code below contains the basic structure.


Next, we wish to reference the ArcGIS API for JavaScript and include a CSS style sheet from esri. The CSS link is a Dojo Dijit theme which is a style sheet for the display of the web application. Once the desired style is chosen, Dojo modules can be loaded into the code. Now it is possible to add scripts that contain the basemap, zoom level, map center, and the dojo function. After all the necessary components are added, the final block of code appears as it does below.




By running the completed code, the application below will appear in a web browser.




The next portion of the lab demonstrates how to build a sample application that uses the ArcGIS API for JavaScript to display a web map from ArcGIS.com. We will use a similar code to the previous section but this code will contain other components that will draw the map elements from ArcGIS.com. One important component is the web map ID which can be found within the url of the web service. The code for this application can be found below.




After running the code, the following application will open in a web browser.





After examining the application, it becomes apparent that the map lacks a legend. After a few code installations, a legend is an easy fix to a boring map application. The improved code and application can be seen below.








The final portion of this lab demonstrates how to develop a full-page web GIS application. For this lab, we will be constructing a web map application that displays locations of schools in the Eau Claire area. The schools and their addresses have been joined into a shapefile that can be viewed below. This shapefile was then published as a service to ArcGIS server.





Instead of creating this application from the beginning, we will be modifying an existing application that displays tree species in San Francisco. The first step is to modify the basemap so that the application opens over Eau Claire. The service for Eau Claire Schools needs to be referenced by using the map ID found in the service’s url. Then, modifications to the code are needed in order to see attribute information such as address, school name, and elevation for the service. Map components such as scale bars were also added to the application. 






Sources