User Tools

Site Tools


guide:help:mnulayerexport

Export

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

The Layer/Export menu item provides the means for exporting the entirety, or a portion, of a vector layer to a new vector layer file or SQL or spatial database layer of a chosen format and coordinate system. If the format and/or coordinate system of the source layer is different than the format and/or coordinate system selected for the export, the exported data is converted to the new format and/or reprojected to the new coordinate system. The Export operation creates a new layer and does not change the source layer in any way.

To maximize compatibility with non-TatukGIS software programs, the Editor:

  • Natively embeds the coordinate system information into the layer (if possible, depending on the layer format),
  • Creates and saves the coordinate system information to a PRJ file (for most, but not every, vector layer format). The PRJ file is saved to the same folder as the layer file, with the same file name as the layer but with the *.prj name extension. (Example: The PRJ file for a layer named sample.shp will be sample.shp.prj.)
  • Creates and saves the code page information to a CPG file. The CPG file is saved to the same folder as the layer file, with the same file name as the layer but with the *.cpg name extension. (Example: The CPG file for a layer named sample.shp will be sample.shp.cpg.)

Clicking on Layer/Export menu opens the Export Layer dialog box (pictured below) which contains a number of methods to limit or specify the data exported from the source layer. The exported data can be limited or specified based on map extent, shape type (for layers containing multiple geometric shape types), spatial selection, SQL attribute query, or any combination of these methods.

To convert a vector layer to a different format

  1. Activate (highlight) the source layer by clicking on its name in the Legend.
  2. Click on the Layer/Export menu item - this invokes the Export Layer dialog box.
  3. Within the Export Layer dialog box, click on the OK button - this invokes the Save As dialog box.
  4. Within the Save As dialog box, go to the drive on which you want to save the file.
  5. Enter the folder in which you want to save the file.
  6. Enter a name for the layer file in the File name field.
  7. Pick the export file format from the Save as type list.
  8. Click on the Save button. The entire layer is exported in the selected file format.

To convert a vector layer to a different coordinate system

  1. Activate (highlight) the source layer by clicking on its name in the Legend.
  2. Click on the Layer/Export menu item - this invokes the Export Layer dialog box.
  3. Near the bottom of the Export Layer dialog box under Layer CS, click on the button on the right-hand side to invoke the Coordinate System dialog box (to select a predefined coordinate system) and the Coordinate System Setup dialog box (to define a coordinate system). (Refer to the Coordinate Systems help topic for guidance).
  4. Confirm the settings on the Coordinate System and/or Coordinate System Setup dialog boxes by clicking on the OK button - this brings back the Export Layer dialog box.
  5. Within the Export Layer dialog box, click on the OK button - this invokes the Save As dialog box.
  6. Within the Save As dialog box, go to the drive on which you want to save the file.
  7. Enter the folder in which you want to save the file.
  8. Enter a name for the layer file in the File name field.
  9. Pick the export file format from the Save as type list.
  10. Click on the Save button. The entire layer is reprojected and exported in the specified coordinate system.

To export shapes contained in a specific extent

  1. Activate (highlight) the source layer by clicking on its name in the Legend.
  2. Click on the Layer/Export menu item - this invokes the Export Layer dialog box.
  3. Within the Export Layer dialog box, use the extent selection options under Select extent to limit the extent (area) of the source layer for the export operation. The Select Extent list options are are: Map extent - export the entirety of the currently active layer, Visible extent - export the extent currently visible in the Map area, User defined - export the extent manually defined by the user by entering horizontal coordinates of the right and left extent limits and vertical coordinates of the top and bottom extent limits, Clipped by extent (for Visible extent and User defined only) - when checked, the shapes located partially outside the defined extent are clipped, then exported; otherwise entire shapes located partially outside the defined extend are exported.
  4. Click on the OK button - this invokes the Save As dialog box.
  5. Within the Save As dialog box, go to the drive on which you want to save the file.
  6. Enter the folder in which you want to save the file.
  7. Enter a name for the layer file in the File name field.
  8. Pick the desired file format from the Save as type list.
  9. Click on the Save button. Only the portion of the source layer contained within the specified extent is exported.

To export only shapes of a specific type

  1. Activate (highlight) the source layer by clicking on its name in the Legend.
  2. Click on the Layer/Export menu item - this invokes the Export Layer dialog box.
  3. Within the Export Layer dialog box, select the geometric shape type (arc/lines, polygon/areas, points, multi-points, or all shape types) to be exported from the Select shape type drop-down list.
  4. Click on the OK button - this invokes the Save As dialog box.
  5. Within the Save As dialog box, go to the drive on which you want to save the file.
  6. Enter the folder in which you want to save the file.
  7. Enter a name for the layer file in the File name field.
  8. Pick the desired file format from the Save as type list.
  9. Click on the Save button. Only shapes of the specified geometric type are exported.

To export only specific shapes using a spatial selection

  1. Activate (highlight) the source layer by clicking on its name in the Legend.
  2. Click on the Layer/Export menu item - this invokes the Export Layer dialog box.
  3. Within the Export Layer dialog box, click on the Selected objects checkbox.
  4. Click on the OK button - this invokes the Save As dialog box.
  5. Within the Save As dialog box, go to the drive on which you want to store the file.
  6. Enter the folder in which you want to save the file.
  7. Enter a name for the layer file in the File name field.
  8. Pick the desired file format from the Save as type list.
  9. Click on the Save button. Only shapes identified by the spatial selection are exported.

To export only shapes matching an SQL query

  1. Activate (highlight) the source layer by clicking on its name in the Legend.
  2. Click on the Layer/Export menu item - this invokes the Export Layer dialog box.
  3. Click on the Builder button - this invokes the Query Builder dialog box. To create an appropriate SQL type query, follow the Constructing SQL type query instructions below. When finished, click on the OK button - all shapes in the source which satisfy query statement become selected and the Export Layer dialog box is brought back.
  4. Click on the OK button - this invokes the Save As dialog box.
  5. Within the Save As dialog box, go to the drive on which you want to save the file.
  6. Enter the folder in which you want to save the file.
  7. Enter a name for the layer file in the File name field.
  8. Pick the desired file format from the Save as type list.
  9. Click on the Save button. Only shapes matching the SQL query statement are exported.

To change the layer code page during any of the procedures described above, insert a new value in the CodePage field in the Export Layer dialog box.

Similar function

  • The Layer/Import function is similar to Layer/Export, 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.

Associated function


Export Layer dialog box provides tools to limit (restrict) the exported data and set the export coordinate system/


Query builder dialog box provides for complex, SQL type query statements against attribute values.

Constructing SQL type query

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 exporting from a layer containing multiple shape types to the ESRI Shape (SHP) file format, only one shape geometry type (point, multipoint, polyline, or polygon) can be exported to each file. (The SHP file specification permits only one shape type per layer.) An attempt to export multiple shape types to a single SHP file will result in an error message.
  • Selection of the SQL Layer Connector (TTKLS & TTKPS files) export format option means that the export will be to a SQL database file. This invokes the New SQL layer dialog box with options to create the new SQL layer on a SQLite database (deployed with the Editor installation) on the local computer, a MS Access database (standard with Windows OS) on the local computer, or Other SQL databases (such as an enterprise database on a networked server). The Other SQL databases option requires the user to create a custom configuration file to connect to the database layer, likely requiring the assistance of a database/network administrator. A current list of supported SQL and spatial databases and configuration guidance is provided in TatukGIS knowledge base items KB10639 and KB10765.
  • If exporting to a new SQL database layer, use a file name without spaces or any special characters to ensure compatibility with various SQL database products.
  • 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.
  • TatukGIS coordinate system naming reflects OGC (OpenGIS) WKT definitions and EPSG codes.
2018/05/22 12:45

Page Tools