Reference: |
Customers with Enterprise Data often have map layers that represent their territories, events, or logistical information. These are published as Map Services to either a subscription based in the Esri Cloud (ArcGIS.com) or on an internal portal. This portal is available with ArcGIS Server 10.3 installations. More information can be found at
http://server.arcgis.com/en/portal/.
InfoAssist comes with a configuration file (geo_services.xml) that contains elements that describe all of the geographic roles, geographic hierarchies, URLs to the map services, and base maps available to InfoAssist. This file is located in the catalog directory under the server home directory:
_edahome/catalog/
Note: Optionally, on the WebFOCUS® Reporting Server, you can show this directory on the application tree by clicking Show edahome, edaconf, edaprfu, scaroot, edatemp, edalog and foccache for all users on the Filter menu of the Reporting Server Console Applications page. Then, you can edit the geo_services.xml file directly in the Reporting Server Console.
The geographic role selections that you can make in InfoAssist are built dynamically using this configuration file. Each role definition in the configuration file, when selected in InfoAssist, generates metadata and a request that is sent to Esri in order to download the appropriate map and place the markers or polygons on the map.
A geographic role can be part of a hierarchy. For example, the World geographic role is at the top of a hierarchy that contains continents, countries, states, and cities. These hierarchies are also described in the geo_services.xml file.
To add a custom geographic role, you must add the necessary parameters for the geography to this file.
You can also customize the geographic roles available by deleting geographic role definitions from the <GEO_ROLES> object. To configure Esri On Premise, you should remove any geographic role definition that references a URL that points to a location outside of your locally hosted Esri server.
Following standard XML syntax rules, each element is enclosed in element start and end tags (<elementname>, </elementname>), and attribute values are enclosed in double quotation marks (").
A geographic role is stored as a geo_role element in the geo_roles object of the geo_services.xml file. A geographic role must be defined with:
The syntax is
<geo_role id="id" value_size="size" unified="false" role_name="rname" role_name_title="rname_title" role_format="rformat" role_format_title="rformat_title" geo_type="gtype" type="datatype" > <vocabulary_rules> <vocabulary>vrule</vocabulary> </vocabulary_rules> </geo_role>
where:
Is an alphanumeric uppercase value, up to 50 characters, used to identify the geographic role.
Is the data type for the ID. Can be one of the following.
Is the optional number of characters in USAGE format length (any, if not set).
Is the name of the geographic role.
Is the title of the geographic role, to be displayed in the Map dialog box for selection.
Is an optional format for the geographic role, useful when the role can be referenced using multiple formats, such as a name, an ISO code, and an abbreviation. Standard role titles include the following.
Is an optional title for the format of the geographic role. It will be shown in parentheses along with the role title in the Map dialog box, for example, State (Abbreviation).
Is one of the following predefined role types.
Is an element that consists of a group of vocabulary elements that explicitly describe column names for the geographic role. These rules will be used to select the best geographic data for the role.
Elements in a rule are connected by the Boolean logic operation OR (only one needs to be satisfied). Each vocabulary element contains words enclosed with special characters. Words in the rule element are connected by the Boolean logic operation AND (all need to be satisfied).
A word may be prefixed and/or suffixed with the percent character (%), which is a place holder for any sequence of characters. If an element contains more than one word, each word has to be prefixed by the character plus (+) or minus (-). Plus indicates that the word must be found in the column name. Minus indicates that the word must not be found in the column name.
Once you have added a geographic role definition, you can run the geo_srv_roles procedure on the WebFOCUS Reporting Server to see that the parameters were added correctly.
The following defines the State Abbreviation geographic role. The role ID is USSTATE_ABBR. The role name is USSTATE with a role format of ABBR. The titles that show in the Map dialog box are US state (Abbreviation). The format is A2, and the vocabulary rules specify that the characters state must be present, but the characters iso, capital, and population must not be present. The geo type is geography, indicating that the returned data will be a geographic area.
<geo_role id="USSTATE_ABBR" value_size="2" type="alpha" role_name="USSTATE" role_name_title="US state" role_format="ABBR" role_format_title="Abbreviation" geo_type="geography"> <vocabulary_rules> <vocabulary>+%state%-%iso%-%capital%-%population%</vocabulary> </vocabulary_rules> </geo_role>
The following is a role definition for latitude values. The role ID is LATITUDE. The role name is also LATITUDE. Its format is numeric. The title that displays in the Map dialog box is Latitude. The geo type is coordinate, indicating that the returned data will be points. The vocabulary rules specify that the characters latitude must be present.
<geo_role id="LATITUDE" type="numeric" role_name="LATITUDE" role_name_title="Latitude" geo_type="coordinate"> <vocabulary_rules> <vocabulary>%latitude%</vocabulary> </vocabulary_rules> </geo_role>
The following is the definition for the city role. The ID is CITY. The role name is also CITY. Its format is NAME. The title that displays in the Map dialog box is City (Name). The definition has a set of vocabulary elements. Only one of the elements in the list must be true. Therefore, the characters city, or town, or country plus capital, or state plus capital must be present.
<geo_role id="CITY" type="alpha" role_name="CITY" role_name_title="City" role_format="NAME" role_format_title="Name" geo_type="geography"> <vocabulary_rules> <vocabulary>+%city%-%population%</vocabulary> <vocabulary>+%town%-%population%</vocabulary> <vocabulary>+%country%+%capital%-%population%</vocabulary> <vocabulary>+%state%+%capital%-%population%</vocabulary> </vocabulary_rules> </geo_role>
After adding a geographic role, you must add its URI to the <URIS> object in the geo_services.xml file. The syntax is.
<uri description="description"> <returned_geometry>type </returned_geometry> <returned_georole>role</returned_georole> <url type="esri" authorization="auth" synonym=""> "url_to_georole" <parameters> <parm order="number" parm_name="pname" parm_georole="parmrole"/> </parameters> </uri>
where:
Is a description for the geographic role to which the URI is pointing.
Is any supported geometry type, such as GEOMETRY AREA.
Is the name of the returned geographic role.
Is the type of authentication needed to access this geographic role. Valid values are:
Is the URL for the geographic role.
Is the number of a parameter needed to retrieve the correct geographic role.
Is the name of the parameter associated with parm order.
Is the name of the geographic role associated with parm order.
Once you have added the URI, you can run the geo_srv_map_uris procedure on the Reporting Server to see that the parameters were added correctly.
Note: You must add the base URL to the list of proxy URLs in the esri_arcgis_rest.xml file. For example:
<ESRI_URL URL="//services7.arcgis.com/L95Wwv9OjRQ0tjAs/ArcGIS" DESCRIPTION="Custom Data" />
These steps describe how to add the WebFOCUS Retail Regions geographic role to the geo_services.xml file.
C:\ibi\WebFOCUSnn\srv\home\catalog\geo_services.xml
where nn is your release of TIBCO WebFOCUS. For example, 82 for release 8.2
<geo_role id="REGION" value_size="50" unified="false" role_name="WF_Region" role_name_title="WF_Region" role_format="NAME" role_format_title="NAME" geo_type="geography" type="alpha" > <vocabulary_rules> <vocabulary>+%region%</vocabulary> </vocabulary_rules> </geo_role>
The ID is REGION. The role name is WF_Region. Its format is NAME. The title that displays in the Map dialog box is WF_Region. The definition has a vocabulary rule. The characters region must be present.
Run the geo_srv_roles procedure on the Reporting Server to see that the role was added correctly. The output is shown in the following image.
<uri description="WFRetail Regions" > <returned_geometry>GEOMETRY_AREA</returned_geometry> <returned_georole>REGION</returned_georole> <parameters_georoles> <parm position="1" parm_georole="REGION" /> </parameters_georoles> <urls> <url type="esri" authorization="none" synonym="" value="//services7.arcgis.com/L95Wwv9OjRQ0tjAs/ArcGIS/rest/services/wfretail_sub_regions/FeatureServer/0" provider="Esri" > <keys key="default" /> <parameters_names> <parm position="1" parm_name="SUB_REGION" /> </parameters_names> </url> </urls> </uri>
Note: You must add the base URL to the list of proxy URLs in the esri_arcgis_rest.xml file. For example:
<ESRI_URL URL="//services7.arcgis.com/L95Wwv9OjRQ0tjAs/ArcGIS" DESCRIPTION="Custom Data" />
Optionally, on the Reporting Server, run the geo_srv_map_uris procedure to see if the parameters were added correctly. The output is shown in the following image.
You will now be able to select this role from the Map As menu the next time you start WebFOCUS, as shown in the following image.
This example configures a map layer using the WF_Region role.
In the Data pane, right-click a field that contains subregion data, for example. On the shortcut menu, select Map As and then select the WF_Region role, as previously illustrated. The output is shown in the following image: