How to Create ShapeFile Layer from WKT Data

By default, you can create map layers from Excel spreadsheets if you have the coordinates (x, y) stored in the individual columns. Since version 2.0, has been added support for coordinates that are stored in the WKT format (well known text). This format allows you to define a point, line or polygon using coordinates that are stored in one cell. This format is widely used and is also used by Microsoft for storing spatial data in a database (SQL Server).

The example is shown in the following figure. The table contains two columns. In the first column (Geometry Definition) are stored individual geometries and in the second column are objects identifiers. We want to display these data from spreadsheet table as map layers in the Map panel of GIS.XL add-in.

You can find the function for this under the item Excel to GIS – Create New Layer (WKT). Before we click on this feature, we must select the data in the spreadsheet (first row is reserved for columns labels).

In the next step, click on the item in ribbon toolbar and pop-up dialog will display. This dialog contains two tabs. In the first we choose a column that contains the geometry definition (in WKT format). In our example, it’s a column named Geometry Definition. Finally, we define the name of new layer.

In the second tab is displayed the structure of data that was selected in spreadsheet. These data will be imported into the shapefile attribute table. The Use property defines whether selected column will be imported into the attribute table or not.

After setting and pressing the Apply button, the selected layers will be created and displayed in the Map Panel. In one spreadsheet table can be defined as lines, as well as points and polygons. The program automatically breaks them into groups and creates separate layers that are named in the form "NewLayerName" & "_point" ("_line" / "_polygon"). The user is informed by the message box when the export is finished.

Consequently, the user can work with the data in the form of classic ShapeFiles. If you want to export map layer to a disk (as ESRI ShapeFiles), select it in the Legend Panel and click the Save Layer button in the ribbon toolbar.

Just like the WKT data import into Map Panel, you can export selected map layers to the Excel spreadsheet in the WKT format using function GIS to Excel – Export Data.