Dennis Decelle GEOG385 American River College Fall 2014 Nevada County Grown Accessing Locally Produced Food in Nevada County Project Summary Western Nevada County is home to a number of small farms and ranches that offer a variety of sustainably grown fruits and vegetables, and grass fed, hormone and antibiotic free meats. Some are certified organic and most of them go above and beyond organic standards without going through the hassle of organic certification. There are many ways to access these producers including the various farmer’s markets around the county as well as grocery stores and restaurants supplied by them. The focus of my project is to help the user find nearby options for supporting local farms and ranches. My web map allows the user to interactively drag and drop a point on the map for their location and enter a buffer distance to find the nearest farm/ranch, farmer’s market, grocery store or restaurant. The user can then click on a selected feature to open a pop-up window for more information such as name, address, contact information, days and times of farmer’s markets, whether a farm is certified organic or if a farm or ranch offers direct sales at their location. There is also the option of viewing the attribute tables to compare features in the current extent and highlight features on the map. Purpose of Project I decided to do this project because I believe it is important to know where your food comes from and how it is produced, and to support your local economy. I also wanted to expand on the functionality of a database that I created previously and explore how it could be applied in an interactive web map application. As a resident of Western Nevada County I wasn’t aware of all the local food options or that this is home to more than 50 small-scale producers. I created this web map application to help both locals and visitors find fresh, local food sources and possibly foster a deeper connection to the community through food. Data Development and Map Creation Data Sources: National Atlas: Major Roads (Interstates, US Highways, State Highways) Cal-Atlas: Lakes, Rivers, Creeks, CA Counties Nevada County GIS: Nevada County Roads, Parcels, Parks, Community Boundaries USGS: Digital Elevation Model with Nevada County in its extent The Farm/Ranch, Farmer’s Market, Restaurant and Grocery Store point data was created by me for a previous database design project. Most of the information was gathered from the Nevada County Grown website and annual Farm Guide for 2013 and entered into tables. The tables were then joined to an Address Points feature class from Nevada County GIS to create the point features. The first step was to preprocess the data. I added CA Counties, Major Roads and Hydrologic features, clipped them to a rectangular area around Nevada County and exported them to my project geodatabase. I then converted the Nevada County GIS data from shapefiles to geodatabase feature classes and clipped the USGS DEM to Nevada County and exported it to the project geodatabase. I converted the DEM to hillshade, set it to 60% transparency and added it to the map on top of the Counties, Parks and Community Boundaries to add depth to the map. When I imported the point data I realized that the tables contained all the fields combined from the table joins with the Address Points layer. I went through each table and hid all the unnecessary fields and made the field aliases more user friendly. (This created problems that I’ll explain later.) With my data compiled and processed I was ready to design my map. One problem I ran into was that the Major Roads layer did not line up with the Nevada County roads layer. I remedied this by turning the Highways layer off at 1:80,000 and Nevada County Highways on at 1:79,999. Unfortunately this meant that I had to style two different highway layers. Also the lakes and rivers labels would only display as all capital letters even though the box for all caps was unchecked. Other than that it was just a matter of deciding what zoom levels to set for each layer and label and what symbols and colors to use. I set zoom levels for all the layers and labels so that more details emerged as the user zooms into the map. 1:250,000 1:80,000 1:3,000 Web Services Development Creating the Map Service was pretty straightforward once the map was styled, labeled and zoom levels were set. I navigated to File/Share As/Service… and stepped through the wizard. When I got to the Service Editor window I reviewed the General Tab and made sure the Start Service Immediately box was checked. In the Capabilities window I unchecked KML and left Mapping checked and added some metadata to the Item Description. I took the default settings for everything else and clicked Analyze. Since there were no errors I clicked publish and hoped for the best. I opened my map service in ArcGIS Server Manager and reviewed all the information and settings. Everything looked good! The next step was to create a geoprocessing service that allows the user to enter their location and a search distance. I created a new point feature class for the point that the user drags and drops at their location and then created an empty polygon feature class as the buffer distance output. I opened a new model and added the buffer tool and the empty point feature. The point feature was set as a parameter and the data type was set to Feature Set to allow the user to input their location as a drag and drop point. I then added a search distance variable and set the data type to Linear Unit. I made it a parameter and entered a default search distance of 5 miles. I added the empty polygon feature class as the Buffer Output and made it a parameter also. After running the model I symbolized the buffer polygon output to hollow with a grey outline and saved it as a layer file. I set the buffer output to reference this layer file when symbolizing the buffer polygon. When I confirmed that the Buffer model worked I copy/pasted it as an input into another model which selects all the Farms/Ranches, Farmer’s Markets, Restaurants and Grocery Stores that are within the Buffer distance and copies them to a new feature class. I ran the model and it worked as I had hoped. I then symbolized the newly created features (the selected features within the buffer distance) with meaningful graphic symbols Now the model was ready to be published as a geoprocessing service. I opened the Geoprocessing Results window and right clicked on the model that I just ran and clicked Share As… Geoprocessing Service. Again I stepped through the wizard to the Service Editor window. I made sure “View results with a map service” was checked in the Parameters window and had to enter some metadata and choose correct the input mode for each parameter in the model. Web Application Design Now that I had a published map service and geoprocessing service it was time to create my web application. I launched ArcGIS Viewer for FLEX and added the Oceans base map from ArcGIS Online, a muted gray background that doesn’t compete with the operational layers. I added my Nevada County Grown map service folder from ArcGIS Server for Operational Layers and chose an extent that zooms to the point features. The pop-up windows were configured to only display the attributes most useful to the user for each point feature class. In the Layout window I added the attribute tables for the point features and configured the tables the same as the pop-up windows. I added the Legend, Layer List and Geoprocessing widgets and then copy/pasted the REST endpoint of my Geoprocessing service from ArcGIS Server Manager into the Task URL space in the Geoprocessing widget. I saved all my settings and opened the application in a web browser. Web Application opened in browser Using the Web Application The user can find the nearest Farms or Ranches, Farmer’s Markets, Restaurants or Grocery Stores using the Geoprocessing widget. The user drops a location point on the map and enters a search distance. All the point features within the search distance radius are selected and symbolized with meaningful graphic symbols: tractor crossing sign for farms and ranches, knife and fork sign for restaurants, grocery cart sign for grocery stores and a green flag for farmer’s markets. Selected Features within 3 miles of user location point. The user can then zoom to the features and view their attributes in the tables or click on a feature to see the attributes in a pop-up window. The attribute tables list all features in the extent and selecting features in the attribute table highlights the features in the map. You can also zoom to a feature by double clicking on the feature. Selected features highlighted in map Discussion of Challenges, Problems, Issues, Resolutions, Outcomes After publishing the map service successfully and previewing it in the FLEX viewer, I decided to make some changes (make point symbols simple solid circles and hide unnecessary fields) and publish it again. Now the attribute tables were empty except a message stating that there were no features within the map extent which was not the case. I tried republishing the map but that didn’t resolve the issue. I retraced my steps and realized that the only major change I made was hiding some fields. I made all the fields visible again, republished the map and then opened it in Google Chrome. Now it only displayed the ESRI base map of the entire world. I tried copy/pasting the URL into Internet Explorer and thankfully my web application was fully operational again with populated attribute tables. Another issue was that the buffer polygon was supposed to display as hollow with a dark grey outline but in the web application it had a faint grey outline which is virtually impossible to see. You have to rely on the different symbols of the selected features to know what falls within the search distance radius. Also I was hoping that the selected features would be highlighted in the attribute table like they are in ArcMap so you could easily compare what the selected farms and ranches had to offer such as direct sales, CSAs or organic certification. However you can select features in the table to highlight them on the map. I also didn’t realize that you couldn’t zoom in far enough to turn on the labels of the point features, but since I included pop-up windows it wasn’t a big deal. Conclusions My goal was to create a functioning web application and I was successful, but there is some added functionality that in retrospect I would add if I had more time. First I would add a select by attribute query so you could select all farms or ranches that are certified organic, offered a CSA subscription or offered direct to consumer sales at the farm/ranch location. I would also add a hyperlink to the URLs in the pop-up windows so you could get to the website with one click. Since the selected set of features aren’t highlighted in the attribute table, I would somehow enable the geoprocessing widget to output tables of the selected features. The most important improvement, although it is probably a complicated process and I have no idea how to do it, would be to create a search distance by drive time or by miles on a road network. Since much of Nevada County is in mountainous terrain, this would be a more realistic way to find the nearest features than a search by buffer distance (as the crow flies).