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


Thursday, October 17, 2013

GEOG.455 LAB 4 ArcGIS Flex API


Goal and Background

This lab is an introduction to using ArcGIS Flex application programming interface for developing Web GIS applications. With proper knowledge, the Flex API can be used to develop custom widgets for applications built with the Flex Application Builder.

Methods

The beginning of this lab deals with adding maps and layers through the Flex API. Once a new Flex project has been created in Adobe Flash Builder, we can then add the Flex API library. Currently, our Flex project is blank, but in order for map components to operate, we need to reference the ArcGIS Flex API that contains all the data required for the application.

In order to display geographic information in our new application we will use a web map. The Flex API provides us with a user interface map component that lets us display content by working with layers that reference web services, preconfigured web maps, or personal on-premise ArcGIS portals. In order to add a map user interface component to the project, we will work with a markup language called MXML.

The following set of code exists to reference the ArcGIS API for Flex library.


Once the reference is added to the markup we can begin to add map components to the application’s user interface. The first component we will construct will act as a placeholder for content later in the lab. The red text in the screenshot below represents this placeholder.




Finally, we will add two map components to the code. The two components include an ArcGIS Tiled Map Service Layer and an ArcGIS Dynamic Map Service Layer. The components are represented below in red text.





After all permutations and additions, the final code is displayed below.





Any errors will appear as red exclamation marks on the left side of the editor screen and will need to be adjusted in  order for the code to run properly. After running this code, the new application will open in a web browser.




The second part of this lab focuses on adding a web map to a Flex application. After referencing the Flex library and namespace, ActionScript can be added to the code in order to access and display a web map by its unique identification number. The code below contains the script which will display the web map. The long red code is the identification number. This code can be replaced by any other identification number from an ArcGIS Online web map url.





Next we will add a declaration. This code will declare the non-default and non-visual properties of the web map function that we entered in the script earlier.





The last component that we will add to this application is a title, which can be found in the code below.





The finished application will display an interactive map of the United States with pop-up information for each county.





In Part 3 of the lab, a pre-written code was opened that launched a web map application for the state of South Carolina. In order to customize the Event Handler graphic listener to display the state of Wisconsin, all that needs to be done is editing every instance of “South Carolina” to “Wisconsin”. After adjusting the zoom values, the web map application now displays data for Wisconsin instead of South Carolina.





Sources

Thursday, October 10, 2013

GEOG.455 LAB 3 ArcGIS Flex Viewer


Goal and Background

This lab is an introduction to creating web based GIS applications. The primary platform for application construction will be the ArcGIS Flex Application Builder. The ArcGIS Application Builder is great for creating easy to use and highly customizable web map applications. The lab will demonstrate how to configure Flex XML and custom web widgets using XML scripting.

Methods

By using ArcGIS Flex Viewer, it is easy to create an application and start configuring immediately. As soon as the application is given a name and save location, the builder displays many options for applying basemaps, operational layers, and map extent. These three features will create the backbone for our web application and will influence how the application will operate.


After the basemap is chosen, operational layers can be added to display different types of data. These operational layers can be further configured so that only certain fields are displayed in the application. In this example, our map will be displaying census block data from 2000, but only data for population, households, and housing units will be shown in the pop-up windows for the operational layer.




By previewing our application inside of the ArcGIS Flex Viewer, we can determine that the process was successful since the pop-up window only displays data for the three specified fields.




In order to add more functionality and interactivity to the map application, widgets can be added. ArcGIS Flex Viewer provides us with a catalog of widgets, but it is also possible to edit and even create our own. In this example, we added the locator widget which pinpoints locations after the address has been typed in the search bar. We also configured the draw tool so that it can perform measuring operations when a line is drawn over a distance.






Widgets can also be added and customized by altering the configuration files of the ArcGIS Flex Application Builder. In this case, we are going to create an xml configuration file for a chart widget that will display census data in a bar graph. Using Notepad++, we can construct the following script for the widget.




The final step for adding the widget is to open the configuration files for the application and insert a code that will reference the new script for the widget. When executed correctly, the chart widget will appear in the map application and follow the rules that were written in the script. By using the draw tools to select census blocks, the tool will then calculate and compare the data for population, households, and housing units.




The last portion of this lab demonstrated how to create a widget from within the Flex Application Builder. As long as you have the proper configuration files and logo images compressed in a folder, the application builder makes it very simple to import data for constructing widgets. The configuration files can be found at the bottom of the widgets page and can be edited by selecting the pencil icon below each widget. Once the desired preferences are fine-tuned, the widget will become usable under the preview tab.

Sources




Thursday, October 3, 2013

GEOG.455 LAB 2 Geospatial Web Services


Goal and Background

The purpose of this lab is to introduce students to the process of creating and hosting geospatial web services via ArcGIS Online for Organizations and through ArcGIS servers. Students will be introduced to numerous methods and techniques in which geospatial services can be successfully published to the web.

Methods

The first section of this lab shows us how to publish a shapefile in ArcGIS.com. ArcGIS Online allows us to upload our own data and adjust the file type and other parameters before it is published. We can also add tags during this step, which will help users find this document if they are searching online for data.


Once the shapefile is published, it is easy to edit features and adjust nearly all aspects of the map. Altering the transparency of the basemap, varying the color scheme, and thickening state and county boundaries all help to create a cartographically pleasing map. The data that we published includes information for highways, interstates, cities and counties.



The next section of the lab focused on publishing a feature hosted service using a CSV file. This process was similar to the shapefile publishing process, except this time we are only starting with a Microsoft Excel document. The first step is to open the document in Excel and save it as a comma separated value file. Now when we add the CSV file using the Add Item prompt, we want to select “Locate features using Latitude/Longitude”. This will allow us to set the POINT_X data from the document to Longitude and the POINT_Y data from the document to Latitude.



We can now publish the CSV file to ArcGIS.com. This particular data displays fires in 2004 in the state of Wisconsin. The data has been added to the map from the previous step.



In the third section of the lab, we learned how to publish a feature hosted service using an ArcMap document.  By clicking on “Share As” -> “Service” on an ArcMap document, a wizard will appear and give us many options for how we would like to publish the service. After using the wizard to add item descriptions, tags, credits, and other information, you can use the Service Editor to analyze the service. Any errors will become visible and will require assistance before the service can be published.

The next section of the lab demonstrated how to publish a tiled map service using ArgGIS Server. This process is similar to the previous process but this time we start with a raster and we will publish the service to my personal SDE Database. The raster is opened in ArcMap and shared as a service like the previous step. After completing the wizard and selecting all of the desired preferences, the service is published to my personal SDE database.



The final section of the lab addresses land use identification. The map that was created from the step above displays the different types of land use in the Chippewa Valley. By examining the legend, we can evaluate the infrastructure of the city and discover patterns that weren’t visible before.





Sources