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.
    File: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