Exercise 2c: Automating quick conversion tools with ModelBuilder

Komplexität: Fortgeschritten Erforderliche Daten: ArcGIS Tutorial Data Setup Datenpfad: C:\arcgis\ArcTutor\Data Interoperability\ Ziel: Automate the execution of quick conversion tools using ModelBuilder.

The Data Interoperability quick conversion tools can be used in ModelBuilder and connected to other geoprocessing tools to automate conversion workflows.

In this exercise, you build a model that performs the following tasks:

Create a toolbox and a model

Voraussetzung:

The Data Interoperability extension must be enabled.

Schritte:
  1. Start ArcMap.
  2. Click the Catalog Window button Fenster "Katalog" on the Standard toolbar.
  3. Type C:\arcgis\ArcTutor\Data Interoperability\zoning\ in the Location text box and press ENTER.

    The location is added to the Catalog tree under the Folders Connection heading.

    Catalog window

  4. Right-click the zoning folder and click New > Toolbox Toolbox.
  5. Right-click the toolbox, click Rename, then name it zoning.
  6. Right-click the zoning toolbox and click New > Model Modell.
    ModelBuilder opens.
    TippTipp:

    By default, the model is named Model. You can rename it by right-clicking it in the Catalog window and clicking Rename from the shortcut menu.

Add the Quick Import tool

Schritte:
  1. Find the Quick Import tool using the Search window Fenster "Suchen" and drag it onto the ModelBuilder canvas.
  2. Double-click Quick Import.
  3. Click the Input Dataset browse button.

    The Specify Data Source dialog box opens.

Choosing the FME reader

Schritte:
  1. Click the Format browse button.

    The FME Reader Gallery dialog box opens.

    FME Reader Gallery

  2. Type gml in the Search text box.
  3. Click the row listing Geography Markup Language (GML) and click OK.

    The FME Reader Gallery dialog box closes.

Specifying the data source

Schritte:
  1. Click the Dataset browse button.

    The Select File dialog box opens.

  2. Navigate to the C:\arcgis\ArcTutor\Data Interoperability\zoning folder.
  3. Click the zoning.gml dataset and click Open.

    The Dataset text box is populated with the path and file name.

    VorsichtVorsicht:
    Some file extensions can be associated with more than one format. It is good practice to visually confirm that the format and file extension are correctly matched before closing the dialog box.
  4. Click OK.

    The Specify Data Source dialog box closes.

Specifying the destination geodatabase

Schritte:
  1. Click the Output Staging Geodatabase browse button, navigate to the C:\arcgis\ArcTutor\Data Interoperability\zoning folder, type zoning2 in the Name text box, then click Save.

    The Output Staging Geodatabase text box is populated with the path and name. In the following section, you connect this output as input to the Select Data tool.

  2. Click OK.

    The Quick Import dialog box closes and displays the tool in a ready-to-run state.

    Quick Import

Add the Select Data tool

Use the Select Data tool to select the zoning feature class contained in the zoning2.gdb geodatabase.

Schritte:
  1. Find the Select Data (ModelBuilder) tool using the Search window Fenster "Suchen" and drag it onto the ModelBuilder canvas.
  2. Click the Connect button Verbindung hinzufügen on the toolbar.
  3. Click zoning2.gdb, click Select Data, then click Input Data Element on the shortcut menu.

    The output geodatabase zoning2.gdb is connected as input to the Select Data tool.

    Select Data

  4. Double-click Select Data and confirm that the Child Data Element text box is set to zoning.
  5. The child data element is the feature class contained in the zoning2.gdb output geodatabase that will be used as input to the Dissolve tool.
  6. Click OK.

    This closes the Select Data dialog box.

Add the Dissolve tool

Schritte:
  1. Find the Dissolve tool using the Search window Fenster "Suchen" and drag it onto the ModelBuilder canvas.
  2. Click the Connect button Verbindung hinzufügen on the toolbar.
  3. Click Output data element, click Dissolve, then click Input Features from the shortcut menu.

    The output data element is connected as input to the Dissolve tool.

    Dissolve
  4. Double-click Dissolve to open the dialog box.
  5. Click the Output Feature Class browse button.

    The Output Feature Class dialog box opens.

  6. Navigate to the C:\arcgis\ArcTutor\Data Interoperability\zoning folder, type zoning_dissolve in the Name text box, then click Save.

    The Output Feature Class dialog box closes and the Output Feature Class text box is populated with the path and file name. By default, the tool adds the (.shp) file extension.

    Dissolve settings

  7. Check the type check box in the Dissolve_Field(s) list.

    Features with the same values for checked fields are aggregated (dissolved) into a single feature. The dissolve fields are written to the output feature class.

  8. Click OK.

    The Dissolve dialog box closes.

  9. Click Model > Save.

Run the model

The model generates a shapefile. During execution, the status window appears and displays a processing log.

Schritte:
  1. Click the Run button Ausführen.

    All the tools in a ready-to-run state are executed.

  2. Click Close on the status message when the model finishes executing.
  3. On the ModelBuilder canvas, right-click zoning_dissolve.shp and click Add To Display from the shortcut menu.

    The results of the tool are displayed in ArcMap.

    ArcMap

  4. Right-click the zoning_dissolve feature layer in the table of contents and click Open Attribute Table on the shortcut menu.

    The features with the same type field values are aggregated.

  5. Close the attribute table.
  6. Right-click the original zoning feature class in the Catalog window, click Item Properties on the shortcut menu, then click the Preview tab.

    Compare your results and notice that the Dissolve tool removed the grid tiles.

  7. On the canvas, right-click zoning_dissolve.shp and click Add To Display from the shortcut menu.

    The results are removed from ArcMap.

Add the Quick Export tool

Add the Quick Export tool to generate a Geography Markup Language (GML) dataset.

Schritte:
  1. Find the Quick Export tool using the Search window Fenster "Suchen" and drag it onto the ModelBuilder canvas.
  2. Right-click Output Dataset, click Rename from the shortcut menu, then type Output GML Dataset.
  3. Click the Connect button Verbindung hinzufügen on the toolbar.
  4. Click zoning_dissolve.shp, click Quick Export, then click Input Layer on the shortcut menu.
  5. The output zoning_dissolve.shp file is connected to the Quick Export input.
    Quick Export to GML
  6. Double-click Quick Export.
  7. Click the Output Dataset browse button.

    The Specify Data Destination dialog box opens.

Choosing the FME writer

Schritte:
  1. Click the Format browse button.

    The FME Writer Gallery dialog box opens.

    FME Writer Gallery

  2. Type gml in the Search text box.
  3. Click the row listing Geography Markup Language (GML) and click OK.

    The FME Writer Gallery dialog box closes.

Specifying the data destination

Schritte:
  1. Click the Dataset browse button.

    The Select File dialog box opens.

  2. Navigate to the C:\arcgis\ArcTutor\Data Interoperability\zoning folder, type zoning_output in the File name text box, then click Save.

    The Select File dialog box closes and the Dataset text box is populated with the path and file name.

    Specify Data Destination

  3. Click OK.

    The Specify Data Destination dialog box closes.

Add a second Quick Export tool

Add another instance of the Quick Export tool to generate a MapInfo TAB dataset.

Schritte:
  1. Find the Quick Export tool using the Search window Fenster "Suchen" and drag it onto the ModelBuilder canvas.
  2. Right-click Output Dataset, click Rename from the shortcut menu, and type Output TAB Dataset.
  3. Click the Connect button Verbindung hinzufügen on the toolbar.
  4. Click zoning_dissolve.shp, click Quick Export (2), then click Input Layer on the shortcut menu.
  5. The output zoning_dissolve.shp is connected to the Quick Export (2) input.
    Quick Export to Mapinfo TAB
  6. Double-click Quick Export (2).
  7. Click the Output Dataset browse button.

    The Specify Data Destination dialog box opens.

Choosing the FME writer

Schritte:
  1. Click the Format browse button.

    The FME Writer Gallery dialog box opens.

    FME Writer Gallery

  2. Type tab in the Search text box.
  3. Click the row listing MapInfo TAB (MITAB) and click OK.

    The FME Writer Gallery dialog box closes.

Specifying the data destination

Schritte:
  1. Click the Dataset browse button.

    The Select Folder dialog box opens.

  2. Navigate to the C:\arcgis\ArcTutor\Data Interoperability\zoning folder and click Open.

    The Select Folder dialog box closes and the Dataset text box is populated with the path. By default, the MapInfo TAB writer uses the input feature class name.

    Specify Data Destination

  3. Click OK.

    The Specify Data Destination dialog box closes.

  4. Click Model > Save.

Run the model and explore the results

Schritte:
  1. On the main menu, click Model > Run Entire Model.

    The model creates a zoning_dissolve.tab dataset and a zoning_output.gml dataset. During execution, the Model status window appears and displays a processing log.

  2. Click Close on the status window when the model is finished.
  3. In the Catalog window, navigate to the C:\arcgis\ArcTutor\Data Interoperability\zoning folder.
  4. Expand the zoning_dissolve.tab dataset, right-click the zoning Polygon feature class, then click Item Description on the shortcut menu.

    Preview the image and explore the metadata.

  5. Expand the zoning_output.gml dataset, right-click the zoning_dissolve Polygon feature class, then click Item Description on the shortcut menu.

    Preview the image and explore the metadata.

This completes the exercise.

Continue to the next exercise: Exercise 3a: Getting started with spatial ETL.

Verwandte Themen


7/10/2012