Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Advanced Configuration Settings for the Append Military Features Tool

Chris Moore edited this page Jun 27, 2013 · 2 revisions

Background/Justification

The Append Military Features Geoprocessing (GP) Tool uses ArcObjects in order to create Representation Rules. However, an ArcObjects-based GP Tool requires administrative privileges on the install machine in order to perform COM registration. Therefore, to eliminate this administrative access restriction/requirement, a design decision was made to run the tool as a standalone executable requiring only user-level permissions. However, this somewhat complicates the typical communications mechanism between the GP Tool dialog and the executable source. For this reason, specific configuration settings are stored as XML files in the application\Data folder.

Advanced Configuration Settings

Two configuration files are included with the Append Military Features executable. These configuration files and what they control are:

  • application\Data\FieldMapping.xml
    • This file controls the mapping of the attributes/labels between the Input and Output datasets
    • It is likely that you will need to edit this file to match the fields in your input datasets
    • For example, this element in the FieldMapping.xml file maps the input field "Name" to the output field "uniquedesignation"
<Field>
       <InputName>Name</InputName>
       <OutputName>uniquedesignation</OutputName>
</Field> 
* A future release may integrate/populate this file using a GP FieldMapping object passed from the GP Tool
  • application\Data\SIDCToFeatureClassRules.xml
    • This file controls which feature class in the target Military Features Geodatabase that an individual input feature will be copied
    • IMPORTANT: the provided file assumes that this target Military Features Geodatabase conforms to the format/schema provided in the released Military Overlay Package (see Military Overlay for ArcGIS for more information). If your target Geodatabase does not match this schema, you will need to edit/modify this file to match the schema used.
    • In the SIDCToFeatureClassRules.xml file, each MappingRule element contains the following:
      • FeatureDataSet - the FeatureDataSet in the target/output geodatabase
      • FeatureClass - the target FeatureDataSet in the target/output geodatabase
      • GeometryType - Point, Line, Area - determines if the feature's geometry type matches and should be placed in this layer.
      • MatchingExpressions - is a series of Regular Expressions (Regex) that determine if a feature's Symbol Identification Code (SIDC) matches and should be placed in this layer. All of the expressions in this series must match in order for the overall match to evaluate as true.
    • This example shows the matching Geometry Type ("Point") and SIDC regular expressions that determine which input features will be copied into the target FriendlyOperations\FriendlyEquipment feature class:
<MappingRule>
    <Name>Friendly Operations Equipment</Name>
    <FeatureDataSet>FriendlyOperations</FeatureDataSet>	
    <FeatureClass>FriendlyEquipment</FeatureClass>	
    <GeometryType>Point</GeometryType>	
    <MatchingExpressions> 
      <Expression><![CDATA[^.[FMAD].{13}$]]></Expression>
      <Expression><![CDATA[^[S][FMAD][PAGSU][APCDXF](?(?<=..G.)(E)|(.)).{10}$]]></Expression>
    </MatchingExpressions>
  </MappingRule>