Exercise 2: Configuring schematic rules

Complejidad: Avanzado Requisitos de datos: Configuración de datos de tutorial de ArcGIS Ruta de datos: C:\ArcGIS\ArcTutor\Schematics\ and C:\ArcGIS\ArcTutor\Schematics\Schematics_Configuration\Mixed_Data Objetivo: Getting acquainted with schematic rules and their configuration on the schematic diagram templates

Schematic rules are very useful for automatically adding or removing things from diagrams. For example, in a utility network, there are often types of equipment that users do not want to see in their schematic diagrams. So schematics has a Node Reduction By Priority rule that will allow those items to be reduced, and the links that connect them are turned into superspans that connect to the next items. Another example might be a social network where things are related to each other via relationship classes in the geodatabase. Here, you may want to allow the user to just select one thing on the map and have schematics use the relationship class information to automatically add the related items to the diagram. For this, you would use the Relationship Rule in schematics. There are several other rules, all built for certain purposes. Please consult the help files for more information on each of the rules available.

In this exercise, you will work with two different rules and do the following tasks:

NotaNota:

Exercise 1 of the Schematics Advanced Configurations Tutorial is required for this exercise. You will be building on what was already configured in Exercise 1.

Creating and configuring a Node Reduction rule

Start by creating and configuring a node reduction rule to remove the pipelines_Net_Junctions nodes that are showing up in the diagrams. Net junctions are just a part of geometric networks, but not a part of the real-world equipment. So you want to get rid of them where it makes sense.

Pasos:
  1. Open ArcCatalog.
  2. Browse to and select the root AdvancedSchematicDB geodatabase that should be found in C:\ArcGIS\ArcTutor\Schematics.
  3. Right-click the AdvancedSchematic schematic dataset that is within this geodatabase and choose Edit schematic dataset button Edit from the pop-up menu.

    This starts the Schematic Dataset Editor application.

  4. Click the BrazilTemplate entry in the Schematic Dataset Editor tree if it is not already selected.
  5. Click the Rules tab on the right side of the editor window.
  6. Click the Add Rule button Add button.

    Node Reduction By Priority happens to be the default rule in the Type drop-down list, and this is the rule that you want to use. You can use the drop-down list to see the other available rules.

    Rules tab - initial content

  7. Click the Rule Properties button Rules Properties button to open the Node reduction by priority rule attributes tab, where you will finish the configuration.
  8. Type Remove Junctions in the Description text box.
  9. Select pipelines_Net_Junctions in the Select the node schematic feature class to reduce drop-down list.
  10. Choose the Connection constraint option.
  11. Uncheck the check boxes next to both of the following:
    1. Reduce nodes with 1 connections
    2. Reduce nodes with >2 connections

    You could also choose No connection constraint (remove everything) to also remove the 1 connection and more than 2 connection items, but there are consequences that need to be analyzed first. Link features in schematics must have 2 connected nodes. If you remove nodes with 1 connection (they are at the end of a link), then that link must also be removed. If you remove nodes that have more than 2 connections, it can result in incorrect connections afterwards because there could be more than one way to logically reconnect things. See the help documentation for more information and other parameters available for this rule.

    Node Reduction rule properties page - final

  12. Click OK.
  13. Click the Save button Save icon on the Schematic Dataset Editor toolbar.

Testing the node reduction by priority rule

Pasos:
  1. Open the Brazil.mxd file using ArcMap.

    This file is located in C:\ArcGIS\ArcTutor\Schematics\Schematics_Configuration\Mixed_Data.

  2. Click the Open Schematic Diagrams button Open schematic diagrams button on the Schematic toolbar to open the Select Schematic Diagrams To Open dialog box.
  3. Browse to and select the diagram named TestDiagram from the AdvancedSchematic schematic dataset, which is located in the AdvancedSchematicDB geodatabase in C:\ArcGIS\ArcTutor\Schematics.

    TestDiagram selected

  4. Click the Add button to open this diagram in the map.

    Notice that at this point nothing has changed. Rules are only applied during diagram generation or update.

  5. Right-click the pipelines_Net_Junctions layer that belongs to the TestDiagram schematic layer and choose Selection > Select All.
  6. Click the List By Selection button List By Selection icon on the toolbar for the Table Of Contents window.

    Note the number of pipelines_Net_Junctions features currently in the diagram.

    TestDiagram - selected junctions

  7. Click the Clear Selected Features button Clear Selected icon on the Tools toolbar.
  8. Click the List By Drawing Order button List By Drawing Order icon on the toolbar for the Table Of Contents window.
  9. Click the Schematic drop-down on the Schematic toolbar and choose Update Diagram icon Update Diagram to open the Update Diagram dialog box.

    Update Dialog - content

  10. Click OK.
  11. Right-click the pipelines_Net_Junctions layer that belongs to the TestDiagram schematic layer and choose Selection > Select All.
  12. Click the List By Selection button List By Selection icon on the toolbar for the Table Of Contents window.

    Note the number of pipelines_Net_Junctions features currently in the diagram. This number should be significantly reduced. Your screen shot may not exactly match this one, depending on what your initial selection was when you generated the TestDiagram schematic diagram.

    TestDiagram - selected junctions after reduction
  13. Close ArcMap and choose No if prompted for saving.

Creating and configuring a relationship rule

There is already a relationship class in the Brazil data you have been using. The class exists between the pug_PUG_gas_plants feature class and the pug_PUG_electric feature class. Since pug_PUG_electric is not part of the geometric network, it was not imported when you ran the import from feature layers earlier. Start by importing that layer.

Pasos:
  1. Switch to the Schematic Dataset Editor application.
  2. Right-click the BrazilTemplate entry in the Schematic Dataset Editor tree and choose Import From Feature Layers from the pop-up menu.

    This opens the Import From Feature Layers dialog box.

  3. Click the ellipse button at the end of the Map or Layer File input area.

    This opens the Select a map or layer file to import dialog box.

  4. Use this dialog box to navigate to and select the Brazil.mxd file that is found in C:\ArcGIS\ArcTutor\Schematics\Schematics_Configuration\Mixed_Data.
  5. Click the Add button to close the dialog box, then update the Import From Feature Layers dialog box.
  6. Click the Clear All button to remove all the selected items, since you already imported those in Exercise 1.
  7. Check the check box next to electric.

    import from feature layers - electric

  8. Click the OK button to close this dialog box.

    A new pug_PUG_electric schematic feature class displays in the Schematic Dataset Editor tree.

    New pug_PUG_electric schematic feature class

  9. Click the Save button Save icon on the Schematic Dataset Editor toolbar.
  10. Click the BrazilTemplate entry in the Schematic Dataset Editor tree and click the Rules tab.
  11. Click the Add Rule button Add button.
  12. Use the Type drop-down list to choose Relationship.

    Relationship rule in the Rules Tab - Initial

  13. Click the Rule Properties button Rules Properties button to open the Relationship rule attributes tab, where you will finish the configuration.
  14. Type Gas to Electric in the Description text box.
  15. Use the Select a source drop-down list to choose pug_PUG_gas_plants.

    When setting these options, you have to think in terms of what the map user will be doing. In this case, the map user will be selecting a gas plant, and you want it to automatically add the electric plants. So pug_PUG_gas_plants will be the source here. The system sees that there is a relationship class in the geodatabase between pug_PUG_gas_plants and pug_PUG_electric, so it automatically fills in some information for you.

    Relationship Properties dialog - Intermediate state

  16. In the relations section, check the check box for Create links.

    This causes the system to add the electric features and draw links from the gas plants to the electric so they are logically connected, even though they are not physically connected by the geometric network.

    Relationship Properties dialog box - Intermediate final

  17. Click OK.
  18. Click the Save button Save icon on the Schematic Dataset Editor toolbar.

Testing the relationship rule

Pasos:
  1. Open ArcMap and load the Brazil.mxd file.

    This file is located in C:\ArcGIS\ArcTutor\Schematics\Schematics_Configuration\Mixed_Data.

  2. Click the Open Schematic Diagrams button Open schematic diagrams button on the Schematic toolbar to open the Select Schematic Diagrams To Open dialog box.
  3. Browse to and select the diagram named TestDiagram from the AdvancedSchematic schematic dataset, which is located in the AdvancedSchematicDB geodatabase in C:\ArcGIS\ArcTutor\Schematics.
  4. Click the Add button to open this diagram in the map.

    Notice that at this point nothing has changed. Rules are only applied during diagram generation or update. Notice also that there are no electric plants currently on this diagram.

    TestDiagram before Relationship rule execution

  5. Click the Schematic drop-down on the Schematic toolbar and choose the Update Diagram icon Update Diagram menu item .
  6. Click OK on the Update Diagram dialog box.

    You should now have two new lines connecting from the gas plants that were already on the diagram to the new electric plant that has been added because of the relationship rule.

    TestDiagram after Relationship rule - with added lines

  7. Close ArcMap and choose No on any save dialog boxes.

Modifying the dataset and relationship rule so it shows containers instead of lines

Here, you will make a few small changes so you can see this relationship via the use of containers. Since the electric station feeds power to both gas plants, draw the electric station as a container that contains both its related gas plants. When you imported the pug_PUG_electric feature layer, it came in as a node with point geometry. This won't work for containers. A container needs to be a polygon or a polyline. So you have to also fix this.

Pasos:
  1. Switch to the Schematic Dataset Editor application.
  2. Expand the BrazilTemplate entry in the Schematic Dataset Editor tree so you can see all the schematic feature classes associated with this diagram template.
  3. Right-click pug_PUG_electric and choose Delete from the menu.

    Delete menu from pug_PUG_electric

  4. Click Yes on the delete message.
  5. Click the Save button Save icon on the Schematic Dataset Editor toolbar.

    Now you have to re-import the layer.

  6. Right-click the BrazilTemplate entry in the Schematic Dataset Editor tree and choose Import From Feature Layers from the pop-up menu.

    This opens the Import From Feature Layers dialog box.

  7. Click the ellipse button at the end of the Map or Layer File input area.

    This opens the Select a map or layer file to import dialog box.

  8. Use this dialog box to navigate to and select the Brazil.mxd file that is found in C:\ArcGIS\ArcTutor\Schematics\Schematics_Configuration\Mixed_Data.
  9. Click the Add button, which will close the dialog box and update the Import From Feature Layers dialog box.
  10. Click the Clear All button to remove all the selected items, since you already imported those in Exercise 1.
  11. Check the check box next to electric.

    import from feature layers - electric

  12. Click the OK button to close this dialog box.

    This time, you will be careful not to save, as you have to modify the schematic feature class so that it has a geometry of a polygon instead of a point.

  13. Select the pug_PUG_electric entry in the Schematic Dataset Editor tree.
  14. Use the Properties tab on the right side of the Editor window to change the Geometry to Polygon.

    pug_PUG_electric changed into Polygon

  15. Click the Save button Save icon on the Schematic Dataset Editor toolbar.
  16. Select the BrazilTemplate entry in the Schematic Dataset Editor tree.
  17. Select the Rules tab.
  18. Select the second line, the relationship rule, so that it is the active row.
  19. Click the Rule Properties button Rules Properties button on the Rules tab.
  20. Check the check box for Relate source and target schematic features.
  21. Check the check box for Reverse relationship.

    You want the electric plant to be the parent or container here, but it is the target in the rule, so you have to reverse the relationship. Again, this is because users will think about selecting the gas plants, not the electric plants. It could be done the other way around, though.

  22. Uncheck the Create links check box.

    Relationship rule properties - final BIS

  23. Click OK.
  24. Click the Save button Save icon on the Schematic Dataset Editor toolbar.
  25. Close the Schematic Dataset Editor.

Testing the relationship rule changes

Pasos:
  1. Open ArcMap and load the the Brazil.mxd file.

    This file is located in C:\ArcGIS\ArcTutor\Schematics\Schematics_Configuration\Mixed_Data.

  2. Click the Open Schematic Diagrams button Open schematic diagrams button on the Schematic toolbar to open the Select Schematic Diagrams To Open dialog box.
  3. Browse to and select the diagram named TestDiagram from the AdvancedSchematic schematic dataset, which is located in the AdvancedSchematicDB geodatabase in C:\ArcGIS\ArcTutor\Schematics.
  4. Click the Add button to open this diagram in the map.

    Notice that at this point, nothing has changed. Rules are only applied during diagram generation or update. You still see the electric plant with links connected to the gas plants.

  5. Click the Schematic drop-down list on the Schematic toolbar and choose the Update Diagram icon Update Diagram menu item .
  6. Click OK on the Update Diagram dialog box.

    You should now have a container that represents the electric plant going around both gas plants:

    TestDiagram with Relationship - polygon
    The interesting thing with containers is that during editing, the containers add some functionality. If you move the container, its contents automatically move with it. If you move the contents, the container automatically resizes to fit its contents.

  7. Close ArcMap and choose No on any save dialog boxes.
  8. Close ArcCatalog.

7/11/2012