4.1 Import Shapefile

Summary

The Import Shapefile app draws 2D objects from ESRI Shapefiles. Optionally, this data can be saved into a worksheet. These 2D objects include-

  • points, which usually represent site locations;
  • lines, which usually represent rivers, roads, and utilities;
  • polygons, which usually represent geographic and political boundaries.

Points are generated as a regular scatter plot, while line shapes and polygons are rendered as graph objects. It's possible to select and modify the line and fill properties of each shape provided that the partial modification option is turned on while importing this data. We recommend turning off the partial modification option when there are too many features, as these may slow down the process depending on your machine's performance.

Tutorial

The imported shapefiles from:

  • Right-click on the Import Shapefile icon Import Shapefile icon.png from the Apps panel, and select Show Sample Folder to open the app sample folder.
  • Download additional sample file Import_Shapefile_App.zip. Unzip the file, and put these files (France_Map.shp, World_Rivers.shp) into the app sample folder.
Import Shapefile sample files.png

Sample 1

  1. Click on the Import Shapefile icon Import Shapefile icon.png from the Apps panel, and select the World_Countries_Map.shp file in the app sample folder, click Open to open the APPs: impSHP dialog.
    Import Shapefile 01.png
  2. In the app dialog, set Line Color to Gray, and check Output Data Points option.
    Import Shapefile 02.png
  3. Then Click OK button to create a World Countries map graph. And the Shapefile dataset is imported in a Worksheet.
    Import Shapefile 03.png
  4. Activate the Graph window, and right-click on the blank space to select Fit Page to Layers. In the dialog, set Margin Control to Border and Border Width to 8. Click OK button.
    Import Shapefile 04.png
  5. Activate the Graph window, click on the Import Shapefile icon Import Shapefile icon.png again, and select the United_States_Map.shp file in the app sample folder, click Open to open the app dialog.
  6. In the app dialog, set Line Width to 0, and Fill Color to Olive. Make sure the Graph is [Graph1]1 (the activated graph) . Click OK button.
    Import Shapefile 05.png
  7. The United States map is added on the World map, and the area is filled. And the Shapefile dataset is imported in a new Worksheet.
    Import Shapefile 06.png
  8. Activate the Graph window, click on the Import Shapefile icon Import Shapefile icon.png again, and select the World_Rivers.shp file in the sample folder, click Open to open the app dialog.
  9. In the app dialog, set Line Width to 1, and Line Color to #86ABE8. Select No for Allow Partial Modification. Make sure the Graph is [Graph1]1 (the activated graph) . Click OK button.
    Note: The line shapes and polygons in the graph are rendered as graph objects. It's possible to select and modify the line and fill properties of each shape provided that the Allow Partial Modification option is turned on while importing this data (Please refer to step8 in Sample 2). But when there are too many features, these may slow down the process depending on your machine's performance. So we recommend turning off the partial modification option here.
    Import Shapefile 07.png
  10. The River lines are added on the World map.
    Import Shapefile 08.png


Sample 2

  1. Click on the Import Shapefile icon Import Shapefile icon.png from the Apps panel, and select the Germany_Map.shp file in the app sample folder, click Open to open the app dialog.
    Import Shapefile 09.png
  2. Click the triangle button on the top-right of the dialog, and choose System Default. Then the dialog rolls back to default setting.
    Import Shapefile 10.png
  3. Set Line Color to Blue. Make sure Graph is set to New Graph [<new>]<new>. Click OK button.
    Import Shapefile 11.png
  4. The German map is created.
    Import Shapefile 12.png
  5. Activate the Graph window with German map, click on the Import Shapefile icon Import Shapefile icon.png again, and select the France_Map.shp file in the app sample folder, click Open to open the app dialog.
  6. Set Line Color to Olive. Check Rescale Source by Shapefile. Make sure the Graph is [Graph2]1 (the activated graph) . Click OK button.
    Import Shapefile 13.png
  7. The France map is added on the graph next to the Germany Map. The graph auto rescale.
    Import Shapefile 14.png
  8. If Allow Partial Modification is available when import shapefile, after importing you can custom the format of polygons by selected in the Object Manager.
    Import Shapefile 15.png

Dialog Settings

Import Shapefile.png

File Name (shape) Name of the file with the geometry for all features.
File Name (attribute) Name of the file that stores feature attributes
File Name (projection) Name of the file that contains information on projection format
Feature Names Feature attribute to import. Available if File Name (attribute) is specified.
File Info File info of shapefile
Display Option
  • Line Style

Line style of lines or polygons.

  • Line Width

Line width of lines or polygons.

  • Line Color

Line color of lines or polygons.

  • Fill Color

Fill color of polygons.

  • Link Axis Length to Scale(isometric)

Specify the Link Axis Length to Scale with X:Y Ratio=1 for shapefile layer. The option is selected by default.

  • Rescale Source by Shapefile
    • If import the sharp file to the active graph window and check this option, the graph axis will be rescaled according to the shapefile. If uncheck it, the active graph axis scale will not be changed.
    • If import the sharp file to a new graph window, this option will not affect the axis scale of the new graph.
Allow Partial Modification Specify the shapefile polygons import as multiple object or single object. After importing, you can check the result In the Object Manager window. There are three options:
  • Auto: Origin will check the number of the shapefile polygons. If shapefile polygons > @shpdl (@shpdl is a System Variable, by default to 30K), it will be imported as a single object.
  • Yes: Import the shapefile polygons as as a single object.
  • No: Import the shapefile polygons as multiple objects.
Worksheet Save the raw data into a worksheet.
Output Data Points Output the graph data points to workbook.
Graph The graph to create a map.
ROI on Matrix Import shapefile as ROI on matrix window.