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/.
The WebFOCUS Reporting Server 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 the Esri map viewer. This file is located in the catalog directory under the server home directory:
drive:\ibi\srvnn\home\catalog
where nn is the release of your Reporting Server. For example, 82 for version 8.2.
The geographic role selections that you can make while using the Map As option are built dynamically using this configuration file. Each role definition in the configuration file, when selected in , 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. The default location is:
drive:\ibi\srvnn\home\catalog\geo_services.xml
where nn is the release of your Reporting Server. For example, 82 for version 8.2.
To add a custom geographic role, you must add the necessary parameters for the geography to this file.
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 geo_role element in the geo_roles object of the geo_services.xml file. A geographic role must be defined with:
The following attributes define a geographic role.
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, which displays when you hover over a data field with a geographic role assigned. You can also assign a geographic role, by title, using the Map As option.
Is an optional format for the geographic role. This is useful when the role can be referenced using multiple formats, such as a name, an ISO code, and an abbreviation.
Is an optional title for the format of the geographic role. It will be shown in parentheses along with the role title when you use the Map As option. For example, US 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.
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 when using the Map As option 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 when you hover over a field with a geographic role assigned (or when using the Map As option) is Latitude. The geo type is geometry, indicating that the returned data will be points or areas described using 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 when you hover over a field with a geographic role assigned (or when using the Map As option) 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>
Some geographic roles exist as part of a hierarchy, and the data for the hierarchical roles are stored at the same map services endpoint (URL). Hierarchical role relationships are stored as hier elements in the geo_services.xml file.
Hierarchy definitions provide with the information needed to use Auto Drill from a geographic role at a higher level of the geographic hierarchy to a geographic role at a lower level of the geographic hierarchy.
Each hierarchy has the name of hierarchy (attribute ID) and a group of LEV elements with the attributes level, geo_role, and, optionally, value. Not all defined roles can be used in hierarchies. The same role can be included in more than one hierarchy and may be on different hierarchical levels in each. However, the same role cannot be used more than once in the same hierarchy. Multiple geographic roles can be assigned to the same hierarchical level in a hierarchy.
Geographic hierarchies are defined with the following attributes:
Is a name of up to 50 alphanumeric characters used to identify the hierarchy.
Is a natural number (integer starting with 1 for the top level) that specifies the level of the role within the hierarchy.
Is the ID attribute of a geographic role (geo_role element).
Is an alphanumeric value, up to 50 characters, predefined for this geo role in this hierarchy.
The following element defines the world hierarchy. The top level is CONTINENT, both the Name role and the ISO code role. Level 2 has four COUNTRY geographic roles, corresponding to four different country formats. Level 3 contains three state formats, level 4 contains the city name, and level 5 contains two address formats and the postal code.
<hier id="World"> <lev level="1" geo_role="CONTINENT"/> <lev level="1" geo_role="CONTINENT_ISO2"/> <lev level="2" geo_role="COUNTRY"/> <lev level="2" geo_role="COUNTRY_FIPS"/> <lev level="2" geo_role="COUNTRY_ISO2"/> <lev level="2" geo_role="COUNTRY_ISO3"/> <lev level="3" geo_role="STATE"/> <lev level="3" geo_role="STATE_ISO_SUB"/> <lev level="3" geo_role="STATE_FIPS"/> <lev level="4" geo_role="CITY"/> <lev level="5" geo_role="ADDRESS_FULL"/> <lev level="5" geo_role="ADDRESS_LINE"/> <lev level="5" geo_role="POSTAL_CODE"/> </hier>
These steps describe how to add the Federal Reserve Districts geographic role to the geo_services.xml file.
drive:\ibi\srvnn\home\catalog\geo_services.xml
where nn is the release of your Reporting Server. For example, 82 for version 8.2.
<geo_role id="FED-DIST" value_size="50" type="alpha" role_name="FEDDIST" role_name_title="FED District" role_format="FR_Distric" role_format_title="FED District Name" geo_type="geography"> <vocabulary_rules> <vocabulary>+%FR_Distric%</vocabulary> </vocabulary_rules> </geo_role
<hier id="US">
<lev level="1" value="United States" geo_role="COUNTRY"/>
<lev level="1" value="US" geo_role="COUNTRY_ISO2"/>
<lev level="1" value="USA" geo_role="COUNTRY_ISO3"/>
<lev level="2" geo_role="USSTATE"/>
<lev level="2" geo_role="USSTATE_ABBR"/>
<lev level="2" geo_role="USSTATE_FIPS"/>
<lev level="3" geo_role="USCOUNTY"/>
<lev level="3" geo_role="USCOUNTY_FIPS"/>
<lev level="4" geo_role="USCITY"/>
<lev level="4" geo_role="USCITY_FIPS"/>
<lev level="5" geo_role="ADDRESS_FULL"/>
<lev level="5” geo_role="ADDRESS_LINE"/>
<lev level="5" geo_role="ZIP3"/>
<lev level="5" geo_role="ZIP5"/>
<lev level="6" geo_role="FED-DIST"/>
</hier>
<uri description="FedReserve Districts"> <returned_geometry>GEOMETRY_AREA </returned_geometry> <returned_georole>FED-DIST</returned_georole> <url type="esri" authorization="none" synonym=""> http://services7.arcgis.com/L95Wwv9OjRQ0tjAs/arcgis/rest/services/ FRDISTRICTS/FeatureServer/0</url> <parameters> <parm order="1" parm_name="FR_Distric" parm_georole="FED-DIST"/> </parameters> </uri>
You will now be able to select this role when using the Map As option the next time you start , as shown in the following image.
WebFOCUS | |
Feedback |