Friday, November 20, 2015

Building a Volunteered Geographic Information System App

Goals and Objectives

The main goal of this lab is to teach students how to develop a web GIS VGI app that can be used by
the general public to upload geo-location information for a number of phenomena.  This is an important lab because such technologies are at the current time starting to really take off in various industries and markets across the world.  Specifically,  This lab will provide students with the following experiences:

1) provide hands-on experience on setting domains and subtypes for enterprise geodatabase features.
2) how to prepare a feature template for the types of VGI data that you want end-users (the public) to collect.
3) creating feature editing services for the data to be collected.
4) develop a simple user interface for the VGI app with the use of ArcGIS API for JavaScript.
5) verifying the integrity of the data added by the public to the app.

hypothetical scenario at hand...

The City of Eau Claire has contracted my geospatial company to efficiently collect information
about the status of public infrastructure in the city of Eau Claire and given a two week time weindow. The city only has limited amount of money to pay you for this project. You have examined the money your company will make from this project and realized that the most economically feasible way of
executing this project is to crowd source the task to the general public as you won’t afford to hire
field workers or send your staff members to the field. A VGI app is absolutely essential for a
successful completion of this job.

Part 1: Authoring a map Doc. to support feature services and web editing.

To create a VGI app, the first thing you must do is author a map document that can enable your end-users to add features in the form of points, lines, or polygons. The goal here, is to create a service where end users can mark and describe fire hydrants, sidewalk conditions, and the overall health of green spaces.  Section 1 of this lab walks students through this by instructing that we connect to our personal enterprise Geo-database on the ArcGIS server.  Once connected, one can access the domain properties of the server and create the parameters which end-users will be able to use to appropriately label the various infrastructure.  For the fire hydrants, sidewalks, and green-spaces, end-users will have two options pertaining to what attributes they can associate with the features they create. 



figure 1: domain name/description followed by a description of the codded values used




















In Section 2, students were to author these feature classes that ultimatly will be the ones that end users can customize when using this VGI application.  This is a relatively easy process, and is all done using the ArcMap Desktop Version.  Once the feature class representing fire hydrants, sidewalks, and green-spaces is created with the appropriate attributes,  students can begin to stylize the appropriate symbol, feature attachments and layer rendering.  Feature attachments will allows end users to add a media file to their geo-located object, to add further context to the condition of that said item.

In Section 3, apart from adding feature attatchments, this is also the time you establish avialable symbols that will be seen when people add the locations of features to the app.. This is a crucial component of the building process, because people will be more inclined to return to using the application if they find that styles and colors used are both logical and aesthetically pleasing.  Here are the symbols that will be used for the three feature classes i have so far created:

figure 2: Feature Classes and their subsequent mapping symbols















Now that the features are symbolized appropriately and we have a base-map, Section 4 will guide us through the process of setting up a good editing environment and add features to the map.  This is essentially troubleshooting the features to see how they appear and all the attribute domains are configuring as desired.  Another thing we are testing is to see if you file attachments are working for each feature class.  Here is an example of each feature when displayed, each feature has a picture that relates to what actual item being mapped is:

figure 3: sybolized features of green space, dead grass, good/bad sidewalks, and yellow/red fire hydrants. 


















Part 2: Prepare feature template for publishing

Now that all properties associated with each feature class has been established, the service can now be uploaded/published to the ArcGIS server so it can be accessed by end users. Section 1 of this part 2 is simply the directions to connecting to the server, which was done successfully.  The objective for Section 2  of part 2 is too publish the map with end user feature access enabled. To do this, all one must do is enable feature access in the service editor window.  Once it is checked/enabled, a feature access tab panel on the left.  If you click on the tab, the publisher has the ability to establish the constraints on what an end-user is capable of doing.  For this application, the default operations of create, delete, query, and update are the operations that will be permitted.

Part 3: Consuming feature service in a web GIS app

Making use of the Javascript API, in section 1 of part , students will create the user interface for the application being built.   This interface will consume the Eau Claire Infrastructure monitoring service created in part 2.  To do this, an HTML, CSS, and JS file will created in conjunction with one another.

The specific functions that this app will require using are the following:




from my work in the other labs in this class, im more or less familiar with all of these functions. However, there are a few modules here that I have not yet worked with. Those include:  




1.       esri/snappingManager: The snappingManager is used to add snapping capability to the editor, measurement widget, draw toolbar, and edit toolbar.  Snapping helps users that are adding features to the map to be more precise when trying to add new features.  Snapping is based on the proximity of an action (like a click of the mouse) to a given features.  If the click or action takes place within the geometric range of the feature, snapping will cause that action to happen in line/on the feature that is already created.

2.       esri/tasks/Geometryservice : Esri provides geometry services that allows end users to preform various operations on geometric features like project, buffer, relate, and area calculation.  Creating such services on your own requires a large amount of understanding and skill with programing, making this one of Esri’s most useful and sought after services.   For a VGI application like the one we just built, geometry services are useful because they allow a user to calculate the length of a damaged sidewalk, or the area of a deteriorating green-space.  The returned geometric figures associated with those features are helpful to better understand the scale of the problem, and how much effort/money it would take to fix.

3.  dojo/i18n!esri/nls/jsapi:  i18n is an internationalization module that processes the development of web apps in such a way that they can be localized for different languages, culture, or region.  Employing this module allows for the process of retrofitting the app if it were to gain bigger application to be more smooth and require less re-engineering. 

      Part 4 and Conlcusion

For the final section of the lab, students are to use the techniques and skills applied in this assignment and create their own VGI application.  I decided for mine to do a smaller version of the application i am building for my term project, which is VGI where people can mark (with polygons and points) the locations of messy yards in the UWEC student housing area.  For the sake of simplicity, the app only allows users to create polygons of areas where trash is found, and provide a comment and image file with that feature to provide context.  Overall, this lab and creating these two VGI apps have been the most interesting thus far.  Its challenging to decide upon what things you want your end users to have access too, and what you don't want them to have access too.  Another challenge of creating these apps is that you are working with people who may have little computer skills, so it must be made simple, but still be useful. The approach and methods of this lab will definitely be made use of by as the semester hits its final turn and I complete the final steps on my term project VGI application.


 



f  



Wednesday, November 4, 2015

Lab 5: ArcGIS API for JavaScript 1

Introduction and Goals

Building off of the skills learned in lab 4, lab 5 focuses on ways one can build geographically based widgets, themes, and operational layers.  To do this, students will utilize ArcGIS JavaScript API as the performance interface.  This API will be embedded in an HTML document, so that it can be uploaded by end users on a variety of browsers (Firefox, Chrome, InternetExplorer).  As such, this lab will make use of HTML, CSS and JavaScript file formats.  The codes used in this lab were abstracted from Sylvia Richardson.

In terms of the objective of this lab, the goal is to become familiar with the ins and outs of ArcGIS JavaScript API to embed GIS services into any website.  Specific objectives include:
  • embedding GIS services to display and interact with a web map; 
  • customize a web GIS application created by someone else and apply it to a different study area by adding your own feature service to the application and also include additional map elements, and build a routing app that leverage network services from an external GIS server

In completing this lab, students should be familiar with writing simple JavaScript codes support multiple WebGIS applications while also becoming more comfortable with the JavaScript API in regards to creating geospatial applications.

Part 1

This portion of the lab has students create a site that displays a map that can be panned and zoomed on. To do this, students used HTML documents, JavaScript documents, and referenced ArcGIS API for use of a base map.   Students used the dojo library to import the the base map used for the website.  The importing of this library was via a JavaScript document that was subsequently refrenced in the HTML document for this website. Students also used the JS file to establish that center of the map, the standard zoom, and the the type of basemap they were extracting from the dojo library. Here is the website created using the basemap and tools from the dojo library and the ArcGIS online API.  Figure 1 and 2 below show the code used in creating this site.


figure 1: HTML doc. To see site, refer to link in paragraph above

 

figure 2: JavaScript linked to HTML in figure 1

























Part 2

Section 1


Part two requires that students build a Web GIS application, but this time the application be equipped with end-user interactive functionalities.  The specific app being made, will display the tree species and attributes of the trees in San Fransisco.  To do this, students created an HTML document, which links to a JavaScript doc also made by students, leverage an installed CSS file, and another JS file that was provided to the class. Here is the final WebApp for part 2 section 1

Part 3: Developing a simple routing application 

Similiar too part two of this lab, part 3 instructs that students create another web service.  The services this time will be one that finds routes between two or more points. The application will make use of a streets basemap that is provided bu Esri, and will form a route between two more locations which the end user will establish by simply clicking on the locations he or she would like to create a route between. like in part 2, this services was made by creating an HTML and an JavaScript file, while also referring to Esri for style guides and for the base-map.  Click here to see experience the  routing application, feel free to click around and route yourself anywhere in our great city of Eau Claire!!!


here is the actual HTML file text that was used to run the application:




Conclusion

parts of this lab were very difficult to manage through.  As i get more familiar with HTML and JS coding, I am becoming more aware of how important it is to diligently edit your work and check for errors as you go.  If you go through the entire coding process and wait till the very end to go through and look for the source of your error causing your script to nut run,  you will have a much more difficult time to find your error.  A helpful tip that me and my classmates have discovered is that using each other as resources can be very helpful.  So far, a second pair of eyes has been much better at finding the problem with a script as apposed to the same ones that have been scanning the same script for an hour already.  otherwise, i found this lab to be the most interactive and useful yet.  The application of this coding has a very broad spectrum of use beyond that which was done in this lab, and i look forward to continually building off of these skill.s