User Tools

Site Tools


guide:help:mnulayerimport

Import

Documentation | Help File | UI | 2D Mode | Menu | Layer | Import

Clicking on the Layer/Import menu item provides the means for importing vector data into the active vector layer. The imported data can replace or be appended to any vector data already contained in the active layer. If the source data is of a different format and/or coordinate system than the active layer, the imported data is converted to the active layer format and/or reprojected to the active layer coordinate system. The Import operation does not change the source layer in any way.

To import a vector layer and replace/append it to another layer open in the Editor

  1. Activate (highlight) the layer to which the import is to be performed. Do this by clicking on its name in the Legend panel.
  2. Click on the Layer/Import menu entry - this invokes the Import layers dialog box.
  3. Within the Import layers dialog box click on the Layer… button - this invokes the Open dialog box.
  4. Within the Open dialog box, go to the drive on which the layer to be imported is stored.
  5. Enter the directory which contains the layer.
  6. Double-click on the layer - this brings back the Import layers dialog box.
  7. If you would like to replace the content of the active layer with the imported one, click on the Replace option. If you would like to merge the open layer with the imported one click on the Append option.
  8. Click on the Next » button.
  9. [OPTIONAL] If you would like to import just a part of the layer instead of its entirety click on the Builder… button - this invokes the Query builder dialog box. Within the Query builder dialog box construct a SQL-type query which evaluates to True for all shapes that you would like to import. When finished, click on the OK button - this brings back the Import layers dialog box.
  10. Choose the extent to be imported from the Extent list.
  11. Click on the Next » button.
  12. Choose which attributes should be imported and optionally rename them.
  13. Click on the Next » button - a progress bar will appear informing you about the progress of the import procedure.
  14. When the progress bar reaches 100% the import process is completed. Click on the OK button.


Merge layers dialog box enables appending imported data to existing data contained by the layer.


Query builder dialog box enables filtering of the imported data based on an SQL attribute query.

Similar function

  • The Layer/Export function is similar to Layer/Import, with much of the same functionality, e.g., vector format and coordinate system conversion, SQL query matching. Many tasks can be performed using either of these functions.

Constructing SQL type query to filter the imported data

The SQL type query consists of comparison statements connected with logical operators in the following way:

[comparison statement] [logical operator] [comparison statement] … [logical operator] [comparison statement].

Additionally, round brackets can be used to group/prioritize a sequence within the query. The left bracket '(' must always appear before a comparison statement and the right bracket ')' after a comparison statement. The logical operators AND and OR must appear before a comparison statement/left bracket or after a comparison statement/right bracket and not at the beginning or ending of the query. The negation operator NOT must appear after a logical operator/left bracket or at the beginning of the query. A comparison statement consists of a primary attribute, relation operator and value/secondary attribute in the following way:

[primary attribute] [relation] [value]     or     [primary attribute] [relation] [secondary attribute].

An attribute which name contains a space must be written inside the square brackets.

To add a comparison statement to the query

  1. Within the Comparison statement box choose the primary attribute from the left Attribute drop-down list.
  2. Choose a relation operator form the Relation drop-down list.
  3. To compare the primary attribute with a value check the Value option and type/choose the value in the field below. To compare the primary attribute with a different (secondary) attribute check the Attribute option and pick the attribute from the list below.
  4. Click on the Add button in the same box.

To add a logical operator to the query

  1. Within the Logical operator box choose logical/negation operator from the drop-down list.
  2. Click on the Add button in the same box.

To put brackets around a desired query part

  1. Within the query text box move the mouse pointer to the beginning/ending of the query part.
  2. Press and hold the left mouse button.
  3. Move the mouse pointer to the ending/beginning of the query part.
  4. Release the left mouse button.
  5. Click on the ( ) button.

To clear the current query statement, click on the Clear button.

Note

  • If importing to an ESRI Shape File (SHP) layer file format, the shape geometry type (point, multipoint, polyline, or polygon) of the imported data must be the shape type of the layer imported into. (The SHP file specification permits only one shape type per layer.) An attempt to import multiple shape types to a single SHP layer will result in an error message.
  • The default logical value of the SQL type query, i.e. the logical value of the empty query, is True.
  • Concerning the Query Builder dialog box, when the primary attribute is of String type and specifying a value for the LIKE comparison the '_' character can be used as a single unspecified character and the '%'  character as a sequence of unspecified characters.
2018/05/22 12:47

Page Tools