Import Polygons from a Shapefile

This guide provides step-by-step instructions on how to import polygons in shapefile format to be used in SAInt as a visualization aid for geographical areas or support for "Subsystems", "Zones" and "Groups". The same method applies to all energy networks (electric, gas, thermal, etc.).

1. Importing polygons from a shapefile

Start the import procedure with Network > Import > Shapefile  Polygons (Figure 1). SAInt prompts for the location of the file in shapefile format to be used (i.e., the *.shp file), and, after the selection, it asks for the name and location where to save the resulting *.plg file. A message informs the user of the outcome of the import. When successful, a pop-up reports the path of the newly written SAInt polygon file (Figure 2). Otherwise, a more informative error message is provided. Please, note that SAInt focuses the import on catching the geometry of polygons. Polygons' attributes in the *.dbf file of the shapefile are simply merged as an alphanumeric string and associated with the Info property of the polygon. It is recommended to simplify the *.dbf file so that only one or two fields are available. Finally, remember to check that the units of measure for XY-Coordinates in Settings  Units are matching the units used in the shapefile containing the data.

SAInt can only accept valid polygons 2D files. Other geometry types will result in an error message.

import polygons shapefile 00
Figure 1. How to launch the import procedure from Network > Import > Shapefile  Polygons in SAInt.
import polygons shapefile 01
Figure 2. Example of the message of a successful import of a shapefile containing polygons, which result is written to the GasNetwork.plg file.

SAInt does not try to simplify the geometry of the imported polygons. Shapes with lots of vertices may result in a decreased responsiveness of the map window, when polygons are visible.

2. Where polygons are saved

Polygons are saved in a dedicated file with the extension *.plg. This file is created by default in the project directory. When polygons are imported from a shapefile, the user is requested to specify a *.plg file. SAInt will save the polygons in the file specified, but it will also append the polygons in the *.plg file of the active project. To avoid having two copies of the same polygons in different files, the user can specify as the destination of the import procedure the *.plg of the active project, overwriting it if already present.

To use polygons created in a different project, the easiest way is to use the procedure Network > Include  Polygon File. Geometry, attributes and graphical properties will be transferred in the new project.