You are on page 1of 29

ABSTRACT

Enterprise geodatabases provide a manageable way


to serve both tabular data and geospatial data to a
customer while maintaining the ability to edit and
manage the data remotely. Web mapping
applications provide the ability to further serve this
data and data analysis tools over the internet. This
document walks through the process of managing
both tabular and spatial data on an existing server and
then using a web mapping application to serve that
data back to the end user over the internet.

ENTERPRISE GEODATABASES
AND WEB MAPPING

Brandon Cameron
Unity ID: bacamero

Brandon Cameron (Unity ID: bacamero)

Date: 04/15/2015

Creating an ArcSDE Geodatabase and Publishing a Web Map with Viewer for Flex
Analyzing Third Party Data, Correcting Data Errors, and Exporting Tables for Later Use (Part A)..................... 1
Creating a ER/UML Diagram and Creating DDL SQL Code from the Diagram (Part B) ....................................... 3
Creating a New ArcSDE Database and Creating a Connection to the Database in ArcCatalog (Part C) ............. 5
Creating Tables and Uploading Tabular Data to the ArcSDE Database (Part D) ................................................ 7
Uploading Spatial Data to the ArcSDE Database (Part E) ................................................................................. 10
Registering an Enterprise Geodatabase (Part F)............................................................................................... 12
Creating a Map and Specifying Symbology (Part G) ......................................................................................... 13
Publishing the Finished Map to Rest Services (Part H) ..................................................................................... 14
Creating a Web Map in Viewer for Flex (Part I) ................................................................................................ 18
Custom Flex Viewer Widgets and Search Tools (Part J) ................................................................................... 21
Summary (Part K) .............................................................................................................................................. 28

GIS 550: Assignment 13

Page 1 of 28

Brandon Cameron (Unity ID: bacamero)

Date: 04/15/2015

A) Analyzing Third Party Data, Correcting Data Errors, and Exporting Tables for Later Use
1. If the data is third party data, it is important to properly review and analyze the data before importing it
into a database. This will allow for the correction of errors while the data is still capable of being easily
manipulated. If the data is provided in a Microsoft Access database, this can easily be done in Design
Mode by selecting the Create tab and then selecting the Query Design option. Then build your query.
In this case, the Locations table was added in the Query Design window and then the dialog box was
closed. The Habitat field was analyzed for errors by adding the Habitat field to query twice by double
clicking on it. Then the Totals option at the top of the tool bar was selected, and the second query
option at the bottom was changed to total by count. The query was then run which produced results
similar to a Microsoft Excel pivot table. If the results identify errors in the data, the user can double click
on the table (i.e. Locations) to open it, filter the table by right clicking on the field name to select only the
error fields, and then make corrections to the data before exporting the table.

GIS 550: Assignment 13

Page 2 of 28

Brandon Cameron (Unity ID: bacamero)

Date: 04/15/2015

2. Once the data has been analyzed, and any identified errors have been removed, the tables then must be
saved in a comma delimited text file so that they may be later imported into the database. If the data
tables are in a Microsoft Access database, this can be quickly done by right clicking on each table and then
selecting the Export option, and then selecting the Text option. From there, click through export
wizard making sure to select the comma delimited options.

GIS 550: Assignment 13

Page 3 of 28

Brandon Cameron (Unity ID: bacamero)

Date: 04/15/2015

B) Creating a ER/UML Diagram and Creating DDL SQL Code from the Diagram
1. In order to efficiently design a database, it is first necessary to create a UML diagram using DIA, or a similar program,
in order to properly document the association between data tables. This data should first be mapped out using an
ER diagram, though if the data is provided in a Microsoft Access database, then this diagram is already created.
Open the database in Access, select F11 to view the tables, and then select the relationships tab to view the current
associations in an ER/UML diagram. The user can also right click on a table and select design view to see important
metadata about each table. Both of these will prove to be extremely useful in the creation of the UML diagram.

GIS 550: Assignment 13

Page 4 of 28

Brandon Cameron (Unity ID: bacamero)

Date: 04/15/2015

2. The following images document the creation of a UML diagram in DIA, though a similar program can also
be used if available. In DIA, the user can drag a new class to the map from the toolbar on the side. This
class can then be edited to match the appropriate table names and the fields contained within each table.
Primary keys for each table can be specified by setting visibility to Private and then links between each
table can be created by dragging the Aggregation tool from the many sided relationship to the one sided
relationship. The parameters in the image below can then be used to finalize the link between tables.

GIS 550: Assignment 13

Page 5 of 28

Brandon Cameron (Unity ID: bacamero)

Date: 04/15/2015

C) Creating a New ArcSDE Database and Creating a Connection to the Database in ArcCatalog
1. In order to create a new Enterprise Geodatabase, run the Create Enterprise Geodatabase tool in ArcCatalog using
the correct login credentials for access to your PostgreSQL server connection. Then specify a name for the
Enterprise Geodatabase and create a new password for the new SDE superuser that will be created. Lastly, specify
the location for the authorization key and run the tool. The tool will then create a new Enterprise Geodatabase with
both a Public schema and a SDE schema.schema.and this newly created SDE user name and password will then
be used to create a new database connection in ArcCatalog.

2. Next, create a new database connection in ArcCatalog using the newly created SDE user role and password.

GIS 550: Assignment 13

Page 6 of 28

Brandon Cameron (Unity ID: bacamero)

Date: 04/15/2015

3. The next step is to create a new user so data will not have to be uploaded to the database using the SDE super user.
Right click on the new connection link created in Step 2 and use the Add User option under the Administration
dropdown menu to create a new user.

4. Lastly, repeat Step 2 in order to create a new database connection using the new user login credentials that were
created in Step 3.

GIS 550: Assignment 13

Page 7 of 28

Brandon Cameron (Unity ID: bacamero)

Date: 04/15/2015

D) Creating Tables and Uploading Tabular Data to the ArcSDE Database


1. Now use the DiaToPostgres.bat tool, which operates on the PERL coding language, to convert the DIA UML
diagram created in Part B, Step 1, to DDL SQL code. This can be done by opening the batch file and inserting the
path to the DIA UML diagram. If the database is not being created from scratch, the alter and drop lines in the
resulting SQL code will need to be commented out as they are designed to erase existing tables with the same
names in order to start from scratch. The code below represents the DDL SQL code created for the Powerlines
database that is referenced throughout this document. This code is entered into the SQL editor window in pgAdmin,
and, when run, the results should return a window stating that the query returned successfully. It is important to
make sure that this code is run under the correct database connection that was created in Part C, Step 4 so that the
resulting tables will be created in the right place.
-- Parse::SQL::Dia version 0.25
-- Documentation
http://search.cpan.org/dist/Parse-Dia-SQL/
-- Environment
Perl 5.016003, C:\Perl\bin\perl.exe
-- Architecture
MSWin32-x86-multi-thread
-- Target Database postgres
-- Input file
C:\Users\bcameron03\Desktop\GIS_Masters\GIS_550\Assignments\Assignment13\Powerlines.dia
-- Generated at
Fri Apr 3 17:41:40 2015
-- Typemap for postgres not found in input file
-- get_constraints_drop
-- alter table tbl_Data drop constraint DataHaveLocations ;
-- alter table tbl_Data drop constraint DataHaveSpecies ;
-- alter table tbl_Data drop constraint DataHaveEvents ;
-- get_permissions_drop
-- get_view_drop
-- get_schema_drop
-- drop table tbl_Locations;
-- drop table tbl_Data;
-- drop table tbl_Events;
-- drop table tbl_Species;
-- get_smallpackage_pre_sql
-- get_schema_create
-- This section creates a schema for the four tables that are being imported.
create table tbl_Locations (
LocationID
varchar(255) not null,-- Unique identification code assigned to the sampling location
LocationDescript varchar(255)
,-- Description of the location (<256 characters)
UTMX
numeric (15,2)
,-- UTM X (easting) coordinate for the center of the plot or location OR starting point of a line or polygon (double precision to15 significant digits)
UTMY
numeric (15,2)
,-- UTM Y (northing) coordinate for the center of the plot or location OR starting point of a line or polygon (double precision to15 significant digits)
Habitat
varchar(50)
,-- Habitat type (aquatic or terrestrial)
HabitatDescription varchar(100)
,-- Description of habitat
constraint pk_tbl_Locations primary key (LocationID)
) ;
create table tbl_Data (
RecID integer not null,-- Unique number automatically assigend to each record to prevent duplicates in key fields
LocationID varchar(255)
,-- Identification code of the sampling location where the species was observed
EventID varchar(255)
,-- Identification code of the sampling event during which the species was observed
Category integer
,-- Type of animal observed: 10=frog; 20=salamander; 30=lizard; 40=turtle; 50=snake; 60=mammal; 80=no animal observed
Protocol varchar(250)
,-- Sampling method used
SpeciesID varchar(50)
,-- Species identification code of the animal observed. "Zero"=no animal observed.
TimeofDay varchar(50)
,-- Indicates whether animal was observed during the day or at night
Number integer
,-- Number of individuals captured (25="several" in field notes;15="numerous" in field notes)
constraint pk_tbl_Data primary key (RecID)
) ;
create table tbl_Events (
EventID varchar(255) not null,-- Identification code of the sampling event
Year numeric(4,0)
,-- Year in which the sampling event occurred
constraint pk_tbl_Events primary key (EventID)
) ;
create table tbl_Species (
SpeciesID varchar(50) not null,-- Unique identification code assigned to the species. " Zero" = no animal observed
CategoryID integer
,-- Code indicating whether the species is mammal (500), reptile (530), or amphibian (540)
FullLatinName varchar(50)
,-- Full Latin name of the species
CommonName varchar(50)
,-- Common name of the species
constraint pk_tbl_Species primary key (SpeciesID)
) ;
-- get_view_create
-- get_permissions_create
-- get_inserts
-- get_smallpackage_post_sql
-- get_associations_create
-- This section adds the keys to associate the tables together.
alter table tbl_Data add constraint DataHaveLocations
foreign key (LocationID)
references tbl_Locations (LocationID) ;
alter table tbl_Data add constraint DataHaveSpecies
foreign key (SpeciesID)
references tbl_Species (SpeciesID) ;
alter table tbl_Data add constraint DataHaveEvents
foreign key (EventID)
references tbl_Events (EventID) ;

GIS 550: Assignment 13

Page 8 of 28

Brandon Cameron (Unity ID: bacamero)

Date: 04/15/2015

2. If the tables were successfully created, then the user will receive a window stating that the query returned
successfully with no result. This process only creates empty tables, primary keys, and relationships between the
tables.

3. In order to copy the content of the tables into the empty database tables, DML statements need to be entered in
order to copy the data out of the previously created text files. It is important to copy the files in the correct order in
order to approve the appropriate relationships between tables. If they are not copied in the correct order, then it is
possible that an error message will occur. The order will be determined by the associations in your ER/UML
diagrams. The DML queries below were each individually entered into the SQL editor window in order to upload the
data from each text file to its corresponding database table. They were copied in the order seen below.
COPY tbl_Events FROM 'C:\Databases\Powerlines\Tables\tbl_Events.txt' DELIMITERS ',' CSV
COPY tbl_Locations FROM 'C:\Databases\Powerlines\Tables\tbl_Locations.txt' DELIMITERS ',' CSV
COPY tbl_Species FROM 'C:\Databases\Powerlines\Tables\tbl_Species.txt' DELIMITERS ',' CSV
COPY tbl_Data FROM 'C:\Databases\Powerlines\Tables\tbl_Data.txt' DELIMITERS ',' CSV

GIS 550: Assignment 13

Page 9 of 28

Brandon Cameron (Unity ID: bacamero)

Date: 04/15/2015

4. If everything was correctly copied, then the resulting database structure should resemble the following image when viewed in
pgAdmin including 3 schemas (user defined role, public, and sde).

User role (schema) created in Step C, Part 4

Schema created in Step C, Part 1

Schema created in Step C, Part 1

GIS 550: Assignment 13

Page 10 of 28

Brandon Cameron (Unity ID: bacamero)

Date: 04/15/2015

E) Uploading Spatial Data to the ArcSDE Database


1. Once a new connection to the database has been created in ArcCatalog (Part C, Step 4), the user can connect to the
database to create new feature datasets and upload spatial data. In order to do this, connect to the database by
either double clicking on the database connection, or by right clicking on the connection, and then selecting the
connect option. Once connected, right click on the connection again and select either the New option to create
a new feature dataset or the Import option in order to import spatial data into existing the database.

2. Once all spatial data has been imported, the database should resemble the following image. All spatial data that is
created in ArcCatalog should create corresponding tables under the pgAdmin user defined schema that was created
in Part C, Step 4. For this reason, it is best to begin all feature classes with fc_ in order to avoid colliding with
database administration tables and also to aid in the easy recognition of feature class tables within the database.

GIS 550: Assignment 13

Page 11 of 28

Brandon Cameron (Unity ID: bacamero)

Date: 04/15/2015

3. If the feature class data is correctly imported into the ArcSDE database, then the resulting user created schema (Part
C, Step 4) in the PostgreSQL database should resemble the image below as seen in the pgAdmin tree.

Feature classes
created in ArcGIS
ArcSDE system
tables
Tables created
in pgAdmin

4. The user can also create a view using SQL code that will essentially work as a saved query. The code below
represents a view that was created to store the locations of all of the observed species along with all of the other
fields that will be useful when publishing the online map. The resulting table can then have XY data added to it in
ArcMap in order to create a feature layer.

GIS 550: Assignment 13

Page 12 of 28

Brandon Cameron (Unity ID: bacamero)

Date: 04/15/2015

F) Registering an Enterprise Geodatabase


1. If a server connection has not yet been established, double click on the Add ArcGIS Server option in ArcCatalog and
select either Publish GIS services or Administer GIS server. Then fill out the following information box with your
URL to your server and the credentials for a user role on your ArcGIS Server Manager account that has at least
publishing capabilities.

2. Even if a server connection already exists, it is still necessary to register the newly created enterprise geodatabase
connection created in Part C, Step 4. This must be done before data can be uploaded to the ArcGIS Rest Services. In
order to do this, right click on the existing server connection, or the one created in the previous step, and then select
the Data Store tab. Then click on the icon that resembles a plus sign and select Register Database. In the
following box, you can either create a new database connection or import the one created in Part C, Step 4.

GIS 550: Assignment 13

Page 13 of 28

Brandon Cameron (Unity ID: bacamero)

Date: 04/15/2015

G) Creating a Map and Specifying Symbology


1. The next step is to create a map document in ArcMAP that contains the layers that need to be uploaded to the
ArcGIS Rest Services. Be sure to add layers to the map directly from the server connection and not from any
personal geodatabases that may already exist. This allows for the spatial data to still be managed from the server.
While creating this document, the user can also specify symbology for each layer to include specific line color,
thickness, and layer names/groupings that will later be included in the online map document. Unfortunately only
basic symbology is supported, so it should be noted that some symbology may appear slightly different once the
final online map is created. It is also extremely important to save the newly created map with the relative paths
stored (File, Map Document Properties, Store Relative Pathnames to Data Sources).

GIS 550: Assignment 13

Page 14 of 28

Brandon Cameron (Unity ID: bacamero)

Date: 04/15/2015

H) Publishing the Finished Map to Rest Services


1. Once all of the editing has been completed and the map has been saved, it is time to publish the data to the ArcGIS
Rest Services. This is done by going to the File menu and then selecting Share As, and then selecting Service.
Then select Publish a Service and continue through the following dialog boxes by specifying a name for the service
and the name for the ArcGIS Rest Services folder where the data will be stored. Then select the Continue button
to proceed to the Service Editor window. This process may take several minutes.

GIS 550: Assignment 13

Page 15 of 28

Brandon Cameron (Unity ID: bacamero)

Date: 04/15/2015

2. Assuming the necessary prompts were correctly filled out, the next step will be setting specific service details in the
Service Editor window. Under the Parameters tab, the default number of records to be returned by the server is
set at 1000, but there are often many datasets that include far more than 1000 records. For this reason it is good
practice to set the default number to a higher number to be sure that your map will properly draw all layers and so
that all your records will be returned when running spatial queries. Under the Capabilities tab, it the Mapping
and KML options will be turned on by default and these options should remain on. The feature access option will
allow the user to have the ability to edit the spatial data. The last step is to fill in the summary, tags, and description
boxes under the Item Description tab. Once this is done, click on the Analyze option at the top of the window to
scan for errors in the data before publishing. After selecting this option, move the Service Editor window to the
side and view any errors, warnings, or messages that exist. Errors will prevent you from publishing your map, and
though you can still publish a map with warnings present, some warnings may still cause issues once the final data is
published. Click on the plus sign icon next to each error or warning to see more detailed information about the
issue. Double clicking on the error or warning will bring up the ArcGIS help window with possible causes and
solutions for the issue.

GIS 550: Assignment 13

Page 16 of 28

Brandon Cameron (Unity ID: bacamero)

Date: 04/15/2015

3. The final step is to publish the data one all errors and/or warnings have been corrected as desired. After clicking on
the Publish option at the top of the window, the data will begin publishing and may take several minutes. A
success message will appear once all data gas been successfully published. The data should then be reviewed in
ArcGIS Rest Services in order to verify that the data was correctly published. If a Feature Access was selected in
the previous step, then there will be two folders in the Rest Services window to include a Feature Server and a Map
Server. Layers in the Feature Server can be uploaded to a map so that the user will have the ability to edit the data
set. If read only access is desired for specific layers, then these layers can be uploaded from the Map Server folder.

GIS 550: Assignment 13

Page 17 of 28

Brandon Cameron (Unity ID: bacamero)

Date: 04/15/2015

I) Creating a Web Map in Viewer for Flex


1. Now that the data has successfully been published to ArcGIS Rest Services, it can be used in the Viewer for Flex
application to create a web map. Once the application is open, select Create a New Application and specify a
name for the map. This name should be short yet descriptive as it will appear in the URL link to your published map.

2. The following window will be the Application Builder window with five different tabs that offer different solutions
for editing the map. The first tab is Maps. This tab has three options within and allows the publisher to decide
what layers will be seen from the user end once the map is published. The Basemaps option allows the editor to
include an ArcGIS basemap that will be included as an underlying layer on the final map. The Operational Layers
option allows the creator to add the layers that were uploaded to the ArcGIS Rest Services in Part H, Step 3. In order
to do this, the editor must select ArcGIS Server, specify the link to the Rest Services page, and then select
Browse. If Feature Access was selected as an option in Part H, Step 2, two subfolders will appear under the
directory. One will be the read only Map Serve folder and the other will be the read/write Feature Server folder.
The editor can then choose the desired layers and select the Include option to add them to the map. The pencil
icon next to each layer allows the editor to choose what popup windows will appear when that feature is selected
while viewing the published web map. The Map Extent option allows the editor to choose an extent that the map
will be automatically focused on each time the web map is accessed. The editor can choose to create a custom
extent or choose to automatically zoom to the extent of the operational layers.

GIS 550: Assignment 13

Page 18 of 28

Brandon Cameron (Unity ID: bacamero)

Date: 04/15/2015

3. The second tab is Widgets. This is where the editor chooses to add and configure map widgets from the catalog.
There are several widgets that are available in the Viewer for Flex application and each widget offers its own
benefits and customizable options. There are also many custom widgets, created by members of the ESRI/ArcGIS
community can be added to the catalog (http://www.arcgis.com/home/search.html?t=content&q=tags:widget).
These custom widgets are typically downloaded in a ZIP file and are added to the catalog by going to the settings
menu, selecting are added by going to the settings menu, selecting Show Advanced Settings, and then selecting
the Manage Custom Widgets option.

GIS 550: Assignment 13

Page 19 of 28

Brandon Cameron (Unity ID: bacamero)

Date: 04/15/2015

4. The third tab is Layout. This allows the creator to toggle several map options on or off. This includes the ability to
display coordinates, the ability to switch basemaps, as well as other items. In addition, the creator can also edit links
that will be displayed on the map. In the image below, a link to the National Park Service website for the New River
Gorge was provided as an added feature for users that may not be as familiar with the park. A pop-up window can
also be displayed by writing custom HTML code to display different text or images.

5. The fourth tab is Design. Under the Logo section, the creator can choose to use a specific image to create a map
banner/logo. Under the Titles & Fonts section, the creator can specify titles and subtitles that will appear on the
published map.

6. The fifth tab is Preview. This tab is used to preview what the final published map will look like so that final
changes can be made if desired. The URL link to the map will also be displayed. The temporary map link based on
the aforementioned data and screenshots is http://152.46.18.15/flexviewers/powerlineproposal/.

GIS 550: Assignment 13

Page 20 of 28

Brandon Cameron (Unity ID: bacamero)

Date: 04/15/2015

J) Custom Flex Viewer Widgets and Search Tools


1. Enhanced Search Widget - One of the most useful, and most customizable, widgets is the Enhanced Search Widget.
This widget allows the editor to create custom XML code in order to define custom search and geoprocessing
parameters. This is done using the pencil icon next to the tool once it is included in the web map. Sample
screenshots of this tool can be seen below and the corresponding code used to create these graphical user
interfaces is also included below as a reference guide. The first map image shows the tool being used to identify
locations where a specific species was observed. The tool finds all of the unique values and serves them to the user
in a dropdown list to choose from. The second image shows the tool being used to perform a spatial query. The
tool was first used to identify all buildings that are listed as Contributing and then used to create a 100 foot buffer
around the selected buildings. The tool then identified all known species that were included in that 100 foot buffer.

GIS 550: Assignment 13

Page 21 of 28

Brandon Cameron (Unity ID: bacamero)

Date: 04/15/2015

Custom SQL Code for the Aforementioned Use of the Enhanced Search Widget:
<configuration>
<layers>
<layer>
<token/>
<definitionexpression/>
<enableexport>true</enableexport>
<name>Powerlines</name>
<url>http://152.46.18.15/arcgis/rest/services/PowerlineProposal/PowerlineProposal/FeatureServer/1</url>
<expressions>
<expression alias="Powerline Buffer" textsearchlabel="Choose a new powerline and buffer distance." isvaluerequired="true">
<values>
<value prompt="Select Line" uniquevalsfromfield="linedesc" isvaluerequired="true" autosubmit="false">upper(linedesc) = upper('[value]')</value>
</values>
</expression>
</expressions>
<graphicalsearchlabel>Use one of the graphical search tools to select Incidents</graphicalsearchlabel>
<spatialsearchlayer>true</spatialsearchlayer>
<titlefield>req_id</titlefield>
<fields all="false">
<field name="linedesc" alias="Description" gridfield="true"/>
<field name="author" alias="Author" gridfield="true"/>
<field name="st_length" alias="Length" gridfield="true"/>
</fields>
<links/>
<zoomscale usegeometry="true" zoompercent="1.6"/>
<autoopendatagrid>false</autoopendatagrid>
<relates/>
<queryattachments>true</queryattachments>
</layer>
<layer>
<token/>
<definitionexpression/>
<enableexport>true</enableexport>
<enableprintgrid title="Select Species">true</enableprintgrid>
<name>Species</name>
<url>http://152.46.18.15/arcgis/rest/services/PowerlineProposal/PowerlineProposal/MapServer/0</url>
<expressions>
<expression alias="Species Observations" textsearchlabel="Choose a species to view sightings." isvaluerequired="true">
<values>
<value prompt="Species Observations" uniquevalsfromfield="commonname" isvaluerequired="true" autosubmit="false">upper(commonname) = upper('[value]')</value>
</values>
</expression>
</expressions>
<spatialsearchlabel>Select the two layers for spatial query</spatialsearchlabel>
<spatialsearchlayer>true</spatialsearchlayer>
<spatialrelationlayer>true</spatialrelationlayer>
<titlefield>DESCRIPTION</titlefield>
<fields all="false">
<field name="commonname" alias="Species Name" gridfield="true"/>
<field name="number" alias="Number Observed" gridfield="true"/>
<field name="year" alias="Year Observed" gridfield="true"/>
<field name="habitat" alias="Habitat Type" gridfield="true"/>
<field name="locationid" alias="Location ID" gridfield="true"/>
<field name="eventid" alias="Event ID" gridfield="true"/>

GIS 550: Assignment 13

Page 22 of 28

Brandon Cameron (Unity ID: bacamero)

Date: 04/15/2015

<field name="recid" alias="Rec ID" gridfield="true"/>


<field name="utmx" alias="X Coordinate" gridfield="true"/>
<field name="utmy" alias="Y Coordinate" gridfield="true"/>
</fields>
<zoomscale usegeometry="true" zoompercent="2"/>
<autoopendatagrid>true</autoopendatagrid>
<queryattachments>false</queryattachments>
</layer>
<layer>
<token/>
<definitionexpression/>
<enableexport>true</enableexport>
<enableprintgrid title="Select Buildings">true</enableprintgrid>
<name>Buildings</name>
<url>http://152.46.18.15/arcgis/rest/services/PowerlineProposal/PowerlineProposal/MapServer/4</url>
<expressions>
<expression alias="Buildings" textsearchlabel="Choose a building type to view." isvaluerequired="true">
<values>
<value prompt="Select Building Type" uniquevalsfromfield="ls_contrib" isvaluerequired="true" autosubmit="false">upper(ls_contrib) = upper('[value]')</value>
</values>
</expression>
</expressions>
<spatialsearchlabel>Select the two layers for spatial query</spatialsearchlabel>
<spatialsearchlayer>true</spatialsearchlayer>
<spatialrelationlayer>true</spatialrelationlayer>
<titlefield>DESCRIPTION</titlefield>
<fields all="false">
<field name="id" alias="Building ID" gridfield="true"/>
<field name="ls_feature" alias="Building Description" gridfield="true"/>
<field name="ls_contrib" alias="Contribution" gridfield="true"/>
</fields>
<zoomscale usegeometry="true" zoompercent="2"/>
<autoopendatagrid>true</autoopendatagrid>
<queryattachments>false</queryattachments>
</layer>
</layers>
<spatialrelationships>
<spatialrelationship>
<name>esriSpatialRelContains</name>
<label>entirely contained in</label>
</spatialrelationship>
<spatialrelationship>
<name>esriSpatialRelIntersects</name>
<label>intersected by</label>
</spatialrelationship>
<spatialrelationship>
<name>esriSpatialRelEnvelopeIntersects</name>
<label>intersected by envelope of</label>
</spatialrelationship>
</spatialrelationships>
<bufferunits>
<bufferunit>
<name>UNIT_FOOT</name>
<label>Feet</label>
</bufferunit>
<bufferunit selected="true">
<name>UNIT_STATUTE_MILE</name>
<label>Miles</label>
</bufferunit>
<bufferunit>
<name>UNIT_METER</name>
<label>Meters</label>
</bufferunit>
<bufferunit>
<name>UNIT_KILOMETER</name>
<label>Kilometers</label>
</bufferunit>
</bufferunits>
<buffervalue>2</buffervalue>
<printdatagrid>
<addheadertoeachpage>true</addheadertoeachpage>
<columnheaderbgcolor>0xa7a7a7</columnheaderbgcolor>
<columnheaderfontcolor>0x000000</columnheaderfontcolor>
<footer>
<pageoftext>Page ## of ##</pageoftext>
<includeprintdate format="MM-DD-YYYY L:NN A">true</includeprintdate>
<disclaimer/>
</footer>
</printdatagrid>
<removeserchlayersminmaxscale>false</removeserchlayersminmaxscale>
<keepgraphicalsearchenabled>true</keepgraphicalsearchenabled>
<autozoomtoresults>true</autozoomtoresults>
<popupsdisabled>false</popupsdisabled>
<enabledatagridinteractionwithwidget>true</enabledatagridinteractionwithwidget>
<toleranceforpointgraphicalselection>6</toleranceforpointgraphicalselection>
<tolerancebydefault>false</tolerancebydefault>
<spatialreference>102003</spatialreference>
<zoomscale>2400</zoomscale>
<csvseparator>,</csvseparator>
<textqualifier>"</textqualifier>
<disablebuttons/>
<defaultselectionoption>textInput</defaultselectionoption>
<enabledrawgraphicbutton>true</enabledrawgraphicbutton>
<enablebuffergraphicbutton>true</enablebuffergraphicbutton>
<enablelocategraphicbutton>true</enablelocategraphicbutton>

GIS 550: Assignment 13

Page 23 of 28

Brandon Cameron (Unity ID: bacamero)

Date: 04/15/2015

<enablemultigraphicssearch>false</enablemultigraphicssearch>
<enableincludetextsearch>true</enableincludetextsearch>
<enableaddtollerance>true</enableaddtollerance>
<enablegraphicsbuffering>true</enablegraphicsbuffering>
<selectedgraphicaltool/>
<multipartgraphicsearch>false</multipartgraphicsearch>
<floatorfixed>fixed</floatorfixed>
<relatetooltip>Show Relates</relatetooltip>
<relateicon>widgets/eSearch/assets/images/i_relate.png</relateicon>
<subselection color="0xfbfe0a" linewidth="4" alpha="0.8"/>
<keepbufferaftersearch>true</keepbufferaftersearch>
<labels>
<urlsearcherrormessage>URL search parameters are incorrect</urlsearcherrormessage>
<includetextquery>include text query in selection criteria</includetextquery>
<includetextquerywarn>Must be the same search layer in both graphical and text search pages.</includetextquerywarn>
<buffergrapicprops>Buffer graphic properties</buffergrapicprops>
<bufferusergraphics>Buffer Graphic</bufferusergraphics>
<norelatesfound>No related features found for:</norelatesfound>
<norelatesfoundalerttitle>No Results</norelatesfoundalerttitle>
<addtolerance>Add search tolerance to point selection</addtolerance>
<existingdrawgraphicslabel>Use Existing Enhanced Draw Widget Graphics</existingdrawgraphicslabel>
<existinglocategraphicslabel>Use Existing Enhanced Locate Widget Graphics</existinglocategraphicslabel>
<existingbuffergraphicslabel>Use Existing Point Buffer Widget Graphics</existingbuffergraphicslabel>
<graphicalsearchlabel>Graphical Search</graphicalsearchlabel>
<textsearchlabel>Text Search</textsearchlabel>
<resultslabel>Results</resultslabel>
<layerlabel>Search Layer:</layerlabel>
<layerfieldlabel>Search Layer Field:</layerfieldlabel>
<nolayerlabel>No search layer defined.</nolayerlabel>
<submitlabel>Search</submitlabel>
<pointlabel>Select by Point</pointlabel>
<linelabel>Select by Line</linelabel>
<rectanglelabel>Select by Rectangle</rectanglelabel>
<polygonlabel>Select by Polygon</polygonlabel>
<clearlabel>Clear</clearlabel>
<loadinglabel>Loading...</loadinglabel>
<selectionlabel>Features Selected:</selectionlabel>
<gridresultslabel>Show Results in Grid</gridresultslabel>
<csvdefaultname>Selected Records</csvdefaultname>
<relatescsvdefaultname>Related Records</relatescsvdefaultname>
<exportbtnlabel>Export...</exportbtnlabel>
<export2csvoptionlabel>Export to CSV...</export2csvoptionlabel>
<export2txtoptionlabel>Export to Txt...</export2txtoptionlabel>
<bufferlabel>apply a search distance:</bufferlabel>
<spatialsearchlabel>Spatial search</spatialsearchlabel>
<applybufferlabel>Apply buffer</applybufferlabel>
<searchlayerlabel>Search entities of:</searchlayerlabel>
<enablemultipartsearch>enable multi-part graphics</enablemultipartsearch>
<zoomalllabel>Zoom</zoomalllabel>
<zoomalltip>Zoom to all results</zoomalltip>
<bufferalpha>Fill opacity</bufferalpha>
<buffercolor>Fill color</buffercolor>
<nobuffercolor>No fill color</nobuffercolor>
<bufferoutlinecolor>Outline color</bufferoutlinecolor>
<nobufferoutlinecolor>No outline color</nobufferoutlinecolor>
<bufferoutlinewidth>Outline Width</bufferoutlinewidth>
<configbuffergra>Configure buffer graphic properties...</configbuffergra>
<required>*</required>
<requiredtooltip>This field is required.
Enter a value to enable search button</requiredtooltip>
<selectmethodtip>Click to change the selection method</selectmethodtip>
<newselectionmethodtip>Create new selection</newselectionmethodtip>
<addselectionmethodtip>Add to current selection</addselectionmethodtip>
<removeselectionmethodtip>Remove from current selection</removeselectionmethodtip>
<pagingqueryerrormsg>Four unsuccessful attempts was made to get unique values for</pagingqueryerrormsg>
<intersectmessage>There is no result to intersect, please make a graphical or text search first.</intersectmessage>
<edrawgraphicsmessage>There are no graphics available</edrawgraphicsmessage>
<nodatagridmessage>No Datagrid configured for this layer</nodatagridmessage>
<buffermessage>There is no result to buffer, please make a graphical or text search first.</buffermessage>
<clearbufferlabel>Clear Buffer</clearbufferlabel>
<alloptiontext>all</alloptiontext>
<spatialchoicemsg>Do you want to use the Buffer Graphics or the Selection Graphics?</spatialchoicemsg>
<spatialchoicetitle>Choose</spatialchoicetitle>
<buffergraphicstext>Buffer Graphics</buffergraphicstext>
<selectiongraphicstext>Selection Graphics</selectiongraphicstext>
</labels>
<symbols>
<simplefillsymbol color="0x00ffff" alpha="0.5">
<outline color="0xff0000" alpha="0.8" width="2"/>
</simplefillsymbol>
<picturemarkersymbol url="assets/images/i_search.png" height="30" width="30" xoffset="0" yoffset="0"/>
<simplelinesymbol color="0xff0000" alpha="0.8" width="2"/>
</symbols>
</configuration>

GIS 550: Assignment 13

Page 24 of 28

Brandon Cameron (Unity ID: bacamero)

Date: 04/15/2015

2. Measure Widget Another incredibly useful tool is the measure widget. This widget allows the user to draw lines
and polygons to determine the distance between or within objects. The widget also allows the user to select a
distance unit and draw paths with the line tool. The text font and size can also be adjusted so the resulting output
will provide the end user with a professional quality map.

3. Geoprocessing Widget There are several steps that must first be completed in order to utilize the geoprocessing
widget, though once these steps are completed, the geoprocessing tool can offer the end user a noteworthy
experience. The first step is creating a scratch folder/directory in the same folder where the MXD map document
exists. The next step is to set the current workspace to the database connection created in Part C, Step 4
(Geoprocessing, Environments, Workspace). The Scratch Workspace should be set to .\folder with folder being
the name of the scratch folder that was created in the same directory as the MXD map document. A model should
then be created in model builder based on the desired geoprocessing tasks. It is important to specify the correct
input and output parameters in the model. Input options that are not marked as a parameter are fixed and cannot
be adjusted outside of the model. Each output in the model should have the feature class base path set to
%SCRATCHWORKSPACE%\ which means that the tool will output files to the scratch directory that was specified in
the Workspace settings. Once the model has been completed and validated, the model should be run in ArcMap on
the map created in Part G, Step 1. Once the model has been successfully run, it should be published using similar
steps to those described in Part H. This is done by right clicking on the results that appear in the Geoprocessing
Results window and then selecting Share As followed by Geoprocessing Service. Once the geoprocessing tool
has been published, a new folder will appear in the rest services directory and this folder contains the tool. The next
step is to add the geoprocessing widget to the online map using the Widgets Tab (Part I, Step 3) in the Viewer for
Flex Application. Link folder with tool, adjust colors, save map. Once the geoprocessing tool is published through
the Service Editor window, it is then necessary to add the geoprocessing widget to the map in the Viewer for Flex
application. Once the widget is added, it must be linked to the published geoprocessing service in ArcGIS Rest
Services. The final output options for the geoprocessing tool can then be adjusted within the widget. Sample
images of this process from start to finish are included below.

GIS 550: Assignment 13

Page 25 of 28

Brandon Cameron (Unity ID: bacamero)

GIS 550: Assignment 13

Date: 04/15/2015

Page 26 of 28

Brandon Cameron (Unity ID: bacamero)

GIS 550: Assignment 13

Date: 04/15/2015

Page 27 of 28

Brandon Cameron (Unity ID: bacamero)

Date: 04/15/2015

K) Summary
1. In summary, professional quality web maps can be provided to end users as a manageable solution to a variety of
problems. Customizability is a key ingredient when constructing a map product to serve to an end user. While there
are many options for filtering through large spatial datasets, one of the best tools to include in a map is the
Enhanced Search Widget. While the geoprocessing widget can perform a variety of tasks, the Enhanced Search
Widget offers a completely customizable experience that can be catered towards the end user. While this tool can
be difficult to configure at times, as it is managed using XML code, the end result is well worth it. One of the most
notable differences between the two widgets is the availability to have self-populating dropdown lists in the
Enhanced Search Widget. This means that dropdown lists will automatically populate with the most current data in
the layer, which means that once data is edited, there is no need to reconstruct the tool. With the Enhanced Search
Widget, there is also no need to use Model Builder to create a model, though this task can sometimes prove to be
easier that configuring the Enhanced Search Widget. Overall, the graphical user interface that is served back to the
end user is well worth the time and effort required to use the Enhanced Search Widget. Web mapping allows for
the serving of voluminous geospatial data sets and analysis tools over the internet and ultimately provides the end
user with access to the data from anywhere in the world.

2. The link to the web map discussed throughout this document is http://152.46.18.15/flexviewers/powerlineproposal.
While the link will only be available temporarily, the aforementioned documentation should provide any level GIS
data administrator with the skills necessary to manage and publish geospatial data, and then serve that data back
out to an end user via a web mapping application.

GIS 550: Assignment 13

Page 28 of 28

You might also like