Exercise 2c: Automating quick conversion tools with 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:
- Imports geodatabase zoning data
- Aggregates the polygons and removes grid tiles
- Exports the results to GML and MapInfo TAB formats
Create a toolbox and a model
The Data Interoperability extension must be enabled.
- Start ArcMap.
- Click the Catalog Window button on the Standard toolbar.
-
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.
- Right-click the zoning folder and click New > Toolbox .
- Right-click the toolbox, click Rename, then name it zoning.
- Right-click the zoning toolbox and click New > Model .ModelBuilder opens.Sugerencia:
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
- Find the Quick Import tool using the Search window and drag it onto the ModelBuilder canvas.
- Double-click Quick Import.
- Click the Input Dataset browse button.
The Specify Data Source dialog box opens.
Choosing the FME reader
- Click the Format browse button.
The FME Reader Gallery dialog box opens.
- Type gml in the Search text box.
- Click the row listing Geography Markup Language (GML) and click OK.
The FME Reader Gallery dialog box closes.
Specifying the data source
- Click the Dataset browse button.
The Select File dialog box opens.
- Navigate to the C:\arcgis\ArcTutor\Data Interoperability\zoning folder.
- Click the zoning.gml dataset and click Open.
The Dataset text box is populated with the path and file name.
Precaución: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. - Click OK.
The Specify Data Source dialog box closes.
Specifying the destination geodatabase
- 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.
- Click OK.
The Quick Import dialog box closes and displays the tool in a ready-to-run state.
Add the Select Data tool
Use the Select Data tool to select the zoning feature class contained in the zoning2.gdb geodatabase.
- Find the Select Data (ModelBuilder) tool using the Search window and drag it onto the ModelBuilder canvas.
- Click the Connect button on the toolbar.
- 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.
- Double-click Select Data and confirm that the Child Data Element text box is set to zoning.
- Click OK.
This closes the Select Data dialog box.
Add the Dissolve tool
- Find the Dissolve tool using the Search window and drag it onto the ModelBuilder canvas.
- Click the Connect button on the toolbar.
- 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.
- Double-click Dissolve to open the dialog box.
- Click the Output Feature Class browse button.
The Output Feature Class dialog box opens.
- 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.
- 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.
- Click OK.
The Dissolve dialog box closes.
- Click Model > Save.
Run the model
The model generates a shapefile. During execution, the status window appears and displays a processing log.
- Click the Run button .
All the tools in a ready-to-run state are executed.
- Click Close on the status message when the model finishes executing.
- 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.
- 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.
- Close the attribute table.
- 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.
- 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.
- Find the Quick Export tool using the Search window and drag it onto the ModelBuilder canvas.
- Right-click Output Dataset, click Rename from the shortcut menu, then type Output GML Dataset.
- Click the Connect button on the toolbar.
- Click zoning_dissolve.shp, click Quick Export, then click Input Layer on the shortcut menu.
- Double-click Quick Export.
- Click the Output Dataset browse button.
The Specify Data Destination dialog box opens.
Choosing the FME writer
- Click the Format browse button.
The FME Writer Gallery dialog box opens.
- Type gml in the Search text box.
- Click the row listing Geography Markup Language (GML) and click OK.
The FME Writer Gallery dialog box closes.
Specifying the data destination
- Click the Dataset browse button.
The Select File dialog box opens.
- 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.
- 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.
- Find the Quick Export tool using the Search window and drag it onto the ModelBuilder canvas.
- Right-click Output Dataset, click Rename from the shortcut menu, and type Output TAB Dataset.
- Click the Connect button on the toolbar.
- Click zoning_dissolve.shp, click Quick Export (2), then click Input Layer on the shortcut menu.
- Double-click Quick Export (2).
- Click the Output Dataset browse button.
The Specify Data Destination dialog box opens.
Choosing the FME writer
- Click the Format browse button.
The FME Writer Gallery dialog box opens.
- Type tab in the Search text box.
- Click the row listing MapInfo TAB (MITAB) and click OK.
The FME Writer Gallery dialog box closes.
Specifying the data destination
- Click the Dataset browse button.
The Select Folder dialog box opens.
- 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.
- Click OK.
The Specify Data Destination dialog box closes.
- Click Model > Save.
Run the model and explore the results
- 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.
- Click Close on the status window when the model is finished.
- In the Catalog window, navigate to the C:\arcgis\ArcTutor\Data Interoperability\zoning folder.
- 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.
- 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.