For example the file with the information about the major world cities looks like this:
|Figure 1 - Adding CSV file on the OpenWebGIS map|
|Figure 2 - Result of adding CSV file with information about major cities (in the OpenWebGIS interface)|
|Figure 3 - Adding CSV file on the QGIS map|
|Figure 4 - Result of adding CSV file with information about major cities (in the QGIS interface)|
Suppose there is already a geographic layer on the map with the boundaries of countries (i.e. polygons). This layer has several attributes with information about each country. In order to export this information to a CSV file with a WKT geometry in it using OpenWebGIS, you need to select the layer you are interested in (in this case, Countries) in the list of “Editable Layer” and click on the menu item “Layers->Export Layer to WKT/CSV” (See Figure 5).
|Figure 5 - Export vector layer to a CSV file with a WKT geometry in it using OpenWebGIS|
If you name the field with the WKT geometry, then this file opens simply as a Geographic layer in QGIS on the map. This is because QGIS sees a field named WKT and uses this value to represent the geometry of each record on the map.
After setting all the options in the window shown in Figure 5, click button "OK". A window will open with the content of the created file. If you wish, you can right here make adjustments to it. Then save this file by clicking on the button "Save Data" (See Figure 6).
|Figure 6 - Saving CSV file with a WKT geometry in it using OpenWebGIS|
|Figure 7 -Import CSV file with a WKT geometry on the OpenWebGIS map|
|Figure 10 - The result of adding CSV file (containing information about countries) with a WKT geometry in one of the interface variants of OpenWebGIS|
Right click on "Countries" layer in the projects TOC (table of contents) and select "Save As..."(See Figure 11)
- In Save Vector Layer As dialog enter the following for the fields:
- Format: Comma Separated Value [CSV]
- Save As: path and the file name, Countries__WKT.csv
- Layer: GEOMETRY=AS_WKT
- (use default values for other fields)
|Figure 11 - Export map layer to CSV file with WKT geometry|