In a previous post, a web application was described, created using the ArcGIS Online service and the interactive WebApp Builder for ArcGIS. See the web application here, and read about its functionality here. In this post let’s look at the process of web app development in ArcGIS Pro 1.4. Some features of creating and publishing a web map in ArcGIS Pro have already been described. This article is about creating and organizing a database of source data, in particular, about editing the attribute table. This issue was considered in the context of the preparation of the source data for the compilation of the thematic map “Mode of entry of Ukrainian citizens to foreign countries” and publishing it as a web layer. There are also a few words about setting up the symbology and publishing a web layer.
Working with spatial data in ArcGIS Pro begins with the creation of a project that stores maps, scenes, databases, as well as tool sets, styles, and history of geoprocessing. A feature dataset with WGS 1984 Web Mercator Auxiliary Sphere coordinate system was created to store the data. This is the coordinate system used in ArcGIS Online, as well as Google Maps and Bing Maps. The input data was taken from Natural Earth. A polygon feature class was imported (base scale 1:10 million) containing the world country borders. The attribute table contains, among other things, information about the name of the country and its status (independent state, dependent territories, occupied or disputed territories). These are the basic parameters for mapping, labelling and setting up the search, next we just need to translate everything into Ukrainian.
Work with the attribute data
Now, let’s look at filling the attribute table with thematic data. The regime of entry to foreign countries for Ukrainian citizens information is taken from the official source – the Ministry of Foreign Affairs of Ukraine website. After analyzing the information provided on this government site, a list of fields to be added to the table of attributes for the map was made:
main parameters: entry mode, entry conditions (data for country classification by the conditions of entry)
additional data: allowed duration of stay, the location of the diplomatic institution of a foreign state, notes on the entry specifics to a particular state (to explain the particularities of visiting a particular state).
To optimize filling up the attribute table, given a large number of spatial objects (250), I configured subtypes and domains formulated by a set of basic parameters.
Subtypes are a subset of features in a feature class, or objects in a table, with identical attributes, which are used as a data classification method. Obviously, subtypes are set for the mode of entry: visa, visa-free, dependent territories (entry is determined by the states-metropolises).
Each of these modes is associated with a certain entry or visa requirements – they were given by domains of coded values. Attributable domains are rules that describe acceptable values for different types of fields and provide integrity of data. If objects in the class of spatial data or table objects are grouped into subtypes (as in this work), each subtype may be assigned its own attribute domain. Since the domain is associated with the attribute field, only values that are part of the domain value are allowed for this field.
For example, for the “visa-free” subtype the following values are encoded: “visa is issued at the embassy or consulate”, “visas can be obtained via the Internet or by post”, “visa is issued at the airport upon arrival”. In other words, the field will not accept a value that is not included in the domain. Using domains helps ensure data integrity by limiting the selection of values for a particular field. Another important thing is the domains help to avoid grammar errors when filling out the table.
Thus, it is possible to set a certain subtype and its corresponding domain value for a whole group of countries. Selecting values is done from the drop down list or in the attributes table, or in the attributes window (if for a group of objects).
All other additional parameters are put in the attribute table manually since they are unique for each spatial object-specific country.
Working with the attribute table in ArcGIS Pro is more comfortable compared to ArcMap (Figure 1). When you select a map layer in the “Contents” window, the main panel highlights the menu for working with the vector layer, the tools for working with the attribute table are located on the tab “Data”. By right clicking on the map layer, you can go to the settings of fields, subtypes and domains through the “Design” menu. To add and configure new fields, open the Fields window. The changes you make should be saved until you exit the edit mode for fields, subtypes or domains (in any case, ArcGIS Pro will remind you to save).
Fig. 1. Attribute table in ArcGIS Pro
Getting ready to share
Now, everything is ready for making a map, but not for getting the web layer published. The thing is that ArcGIS Pro does not support sharing a map layer as a vector web layer (Feature layer type) if it is designed based on data from two or more fields.
For sharing a web layer in ArcGIS Online, a type of Tile layer (a set of raster map tiles) or a Vector tile layer can also be used. But for a web application, the type of web layer should be Feature layer for the map to be interactive, in particular, we want pop-up windows. On the other hand, the values of subtypes and domains in the attribute table are encoded. These are used for data classification. To form map legend it is more convenient to have text values (so that no renaming is needed further on).
The solution is as follows:
- in the attribute table add new fields and copy the encoded subtype and domain values there
- next, replace the codes with corresponding values
- and then the text characteristics need to be combined to form a new field. This field should be the basis for classifying features, creating a thematic layer “Entry mode and conditions for obtaining a visa”), which will be published in ArcGIS Online.
To implement this the geoprocessing tools can be used. On the Analysis tab, click Tools. The Geoprocessing pane opens. For our task, we use the Add Field and Calculate Field tools.
In the Calculate Field tool use replace() function to move the data from other fields and ConcatenateFields() function to join and format the text in one field. To automate the workflow, a simple model is built in the ModelBuilder application, which is part of ArcGIS Pro. The sequence of geoprocessing in the model is shown in Figure 2.
Fig. 2. Geodata processing in ModelBuilder
The project stores the history of all the tools used including the analysis parameters and error messages. So, if necessary, you can view the processing history of a particular project and choose the tools and parameters that have been successfully applied, for example, to build the model in ModelBuilder. By the way, the developed models are also stored in the current project (unless the “Save as” option for the created model is selected).
The final stage of development in ArcGIS Pro is the symbology and labels set for the thematic map, and sharing of the web layer (Figure 3). When selecting a certain layer of a map, in the main panel the bookmark tabs will be highlighted for the vector layer menu. Symbol settings (scaling, transparency, etc.) of the selected map layer are available on the Design tab, or by right-clicking on the layer. Now the classification of my data is carried out at unique values from one field, which summarizes the characteristics of countries by the modes of entry.
The options for creating and adjusting the signatures of the map objects are located on the “Labels” tab. Web layer publishing is done through the Sharing menu. Here you should pay attention to the preliminary error analysis of the map layer. If the program finds them, messages and recommendations will be made to help eliminate them.
Fig. 3. Setting up symbology and labelling, sharing web layer in ArcGIS Pro