4.1 Import ShapefileImport-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
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](//d2mvzyuse3lwjc.cloudfront.net/doc/en/App/images/Import_Shapefile/Import_Shapefile_sample_files.png?v=71361)
Sample 1
- Click on the Import Shapefile icon
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](//d2mvzyuse3lwjc.cloudfront.net/doc/en/App/images/Import_Shapefile/Import_Shapefile_01.png?v=71345)
- In the app dialog, set Line Color to Gray, and check Output Data Points option.
![Import Shapefile 02.png](//d2mvzyuse3lwjc.cloudfront.net/doc/en/App/images/Import_Shapefile/Import_Shapefile_02.png?v=71346)
- Then Click OK button to create a World Countries map graph. And the Shapefile dataset is imported in a Worksheet.
![Import Shapefile 03.png](//d2mvzyuse3lwjc.cloudfront.net/doc/en/App/images/Import_Shapefile/Import_Shapefile_03.png?v=71347)
- 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](//d2mvzyuse3lwjc.cloudfront.net/doc/en/App/images/Import_Shapefile/Import_Shapefile_04.png?v=71348)
- Activate the Graph window, click on the Import Shapefile icon
again, and select the United_States_Map.shp file in the app sample folder, click Open to open the app dialog.
- 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](//d2mvzyuse3lwjc.cloudfront.net/doc/en/App/images/Import_Shapefile/Import_Shapefile_05.png?v=71349)
- 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](//d2mvzyuse3lwjc.cloudfront.net/doc/en/App/images/Import_Shapefile/Import_Shapefile_06.png?v=71354)
- Activate the Graph window, click on the Import Shapefile icon
again, and select the World_Rivers.shp file in the sample folder, click Open to open the app dialog.
- 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](//d2mvzyuse3lwjc.cloudfront.net/doc/en/App/images/Import_Shapefile/Import_Shapefile_07.png?v=71356)
- The River lines are added on the World map.
![Import Shapefile 08.png](//d2mvzyuse3lwjc.cloudfront.net/doc/en/App/images/Import_Shapefile/Import_Shapefile_08.png?v=71353)
Sample 2
- Click on the Import Shapefile icon
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](//d2mvzyuse3lwjc.cloudfront.net/doc/en/App/images/Import_Shapefile/Import_Shapefile_09.png?v=71355)
- 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](//d2mvzyuse3lwjc.cloudfront.net/doc/en/App/images/Import_Shapefile/Import_Shapefile_10.png?v=71357)
- Set Line Color to Blue. Make sure Graph is set to New Graph [<new>]<new>. Click OK button.
![Import Shapefile 11.png](//d2mvzyuse3lwjc.cloudfront.net/doc/en/App/images/Import_Shapefile/Import_Shapefile_11.png?v=75970)
- The German map is created.
![Import Shapefile 12.png](//d2mvzyuse3lwjc.cloudfront.net/doc/en/App/images/Import_Shapefile/Import_Shapefile_12.png?v=71358)
- Activate the Graph window with German map, click on the Import Shapefile icon
again, and select the France_Map.shp file in the app sample folder, click Open to open the app dialog.
- 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](//d2mvzyuse3lwjc.cloudfront.net/doc/en/App/images/Import_Shapefile/Import_Shapefile_13.png?v=71360)
- The France map is added on the graph next to the Germany Map. The graph auto rescale.
![Import Shapefile 14.png](//d2mvzyuse3lwjc.cloudfront.net/doc/en/App/images/Import_Shapefile/Import_Shapefile_14.png?v=71359)
- 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](//d2mvzyuse3lwjc.cloudfront.net/doc/en/App/images/Import_Shapefile/Import_Shapefile_15.png?v=71368)
|