Manage extraction queries

获得 Aviation Charting 许可后可用。

Extraction queries are SQL statements based on attributes that limit the creation of cartographic features. These queries can be edited using the Extraction Queries tool on the View tab. The queries are stored in the AIS_ExtractionQuery table, which is included in the AIS Charting schema.

You can construct simple or advanced queries. Simple queries allow you to create SQL statements to apply to the primary feature, whereas advanced queries allow you to use relationships with other features and tables to refine feature output.

The Extraction Queries tool allows you create and manage queries that affect the creation of cartographic features. The queries serve as attribute-based filters that limit which features get chart-specific cartographic copies. Extraction queries are stored in the AIS_ExtractionQuery table in an aviation workspace. They can be associated with one or more areas of interest using different tags.

注:

Extraction queries are only used if they match the AIS_AOI.Tags attributes, found on the AIS_AOI feature class, or are a subset of the AIS_AOI.Tags. For example, if the AIS_AOI.Tags='Enroute;Low' and AIS_ExtractionQuery.Tags='Low', the extraction query will be processed.

The tool can be accessed with or without an active map if the tool has access to an aviation workspace.

Access existing extraction queries

You can open the AIS_ExtractionQuery table through an active map with visible layers or through an active map with an aviation workspace.

Access a map with visible layers

Ensure your map is active.

  1. In the Contents pane, click an active map with visible layers.
  2. Open the AIS_ExtractionQuery table by doing one of the following:
    • On the View tab, in the Windows group, click the Aviation drop-down arrow, and click the Extraction Queries button 提取查询.
    • On the Aviation Charting tab, in the Cartographic Management group, click the Extraction Queries button 提取查询.

    The AIS_ExtractionQuery table appears.

Access an aviation workspace

If your map needs layers from an aviation workspace, or if you want to access the extraction queries from a workspace, follow these steps. Ensure your map and aviation workspace are active.

  1. In the Contents pane, click an active map to which layers need to be added from an aviation workspace.
  2. On the View tab, in the Windows group, click the Aviation drop-down arrow, and click the Extraction Queries button 提取查询.
  3. In the Select Workspace dialog box, browse to and choose the Aviation Workspace that contains the layers you want.

    The AIS_ExtractionQuery table appears.

  4. 单击确定

Create extraction queries

Complete the following steps to create an extraction query:

  1. On the Extractions tab, in the Changes group, click one of the following:
    • New Simple Query button 新的简单查询—Construct a query based on attributes from a single feature class.
    • Advanced Query button 新的高级查询—Construct a query based on attributes from one or more related feature classes.
  2. Complete all the required properties in the Extraction Query Properties pane: Description, Tags, Input Feature Class, From, and Expression.
  3. On the Extractions tab, in the Changes group, click the Save button 保存.

Modify extraction queries

Complete the following steps to modify the extraction queries:

  1. In the Extraction Queries view, choose a query from the list.

    The Extraction Query Properties pane appears on the right side of the view.

  2. Modify the query properties.
    注:

    Only advanced queries have the From property.

  3. Click Apply to save changes to the expression.
  4. On the Extractions tab, in the Changes group, click the Save button 保存.
  5. Optionally, on the Extractions tab, in the Changes group, click the Discard Edits button 放弃编辑内容.
    警告:

    This discards all the changes since the last save including new queries.

  6. Optionally, click a specific query and click Undo Changes.

    This discards changes from a specific query only.

  7. 单击保存
  8. All your changes to the AIS_ExtractionQuery table are saved.

Delete extraction queries

Complete the following steps to delete extraction queries:

  1. Choose a query from the list.
  2. On the Extraction tab, in the Clipboard group, click the Delete button 删除.

    Optionally, you can right-click a query and click Delete.

    注:

    This marks the query for deletion. You can undo the deletion by right-clicking a query that is marked for deletion and clicking Undo Deletion.

  3. Save your changes to delete the extraction query.
    警告:

    Once saved, Undo Deletion is no longer an option.

  4. 单击保存

All your changes to the AIS_ExtractionQuery table are saved.

Copy extraction queries

Complete the following steps to copy extraction queries:

Copy from the same workspace

Extraction queries can be duplicated in an aviation workspace. This can be useful when similar logic is required for a number of different feature classes.

  1. Choose a query from the list.
  2. On the Extraction tab, in the Clipboard group, click the Copy button 复制, and click the Paste button 粘贴.

    A new copy of the selected query is added to the list, highlighted in green. This query can be modified before being saved.

Copy between workspaces

Extraction queries can also be copied between aviation workspaces. This can be useful when data for a given chart series is distributed among several aviation workspaces. To copy queries to another aviation workspace, open an Extraction Queries view for each workspace.

  1. Choose an aviation workspace other than the one used to open the previous Extraction Queries view.
  2. Open the Extraction Queries view from which you want to copy a query and choose the query to copy.
  3. On the Extraction tab, in the Clipboard group, click the Copy button 复制.
  4. Switch to the Extraction Queries view to which you want to paste the query.
  5. On the Extraction tab, in the Clipboard group, click the Paste button 粘贴.

    A new copy of the selected query is added to the list, highlighted in green. This query can be modified before being saved.

Copy between tables

You can open the AIS_ExtractionQuery table from other workspaces so that you can copy queries back and forth. You can run the Extraction Queries tool without having a map open. It prompts you for a database location to work on when you run the tool. Only databases loaded with the AIS Charting schema are compatible with this tool.

注:

If you already have an active map with features from an AIS Charting database, the tool defaults to that database as the workspace.

Complete the following steps to create and edit extraction queries between tables:

  1. Choose the query you want to copy.
  2. In the Extraction group, click the Copy button 复制.
  3. Switch to your other ExtractionQuery table, and click the Paste button 粘贴.

    Rows in the AIS_ExtractionQuery table are red or green while editing. Green rows are valid queries, and red rows have not been properly completed. Similarly, when you click the Save button 保存, all the rows turn gray, indicating they are successfully validated and saved.

警告:

All of the required properties in the Extraction Queries Properties dialog box must be filled in for the query to be considered complete. Incomplete extraction queries are highlighted in red, while modified queries are highlighted in green. Closing the Extraction Queries pane with green or red rows results in an unsaved changes alert message. Saving with red rows also results in an error message.

相关主题