Import layer into GeoRAMS¶
Spatial data are available in many different formats both as raster and vector data. GeoRAMS can connect to many spatial data formats (all those supported by GDAL – see http://www.gdal.org/ogr_formats.html and http://www.gdal.org/formats_list.html, provided the relevant dependencies have been configured). GeoRAMS is currently configured to use PostgreSql to manage the various vector datasets and, as such, if datasets are to be incorporated into the GIS, they need to be converted and imported into PostgreSql. This section provides several methods for conducting such data conversion and import.
Import to SQL Server
*Using the Upload Layer utility in GeoRAMS*. This utility currently only supports importing shp files and GeoTiff images. It uses Geoserver’s Import Data feature in the backend. As such, if errors are encountered, the detailed messages can be accessed via that interface (see the next section).
Data conversion/import between disparate formats and systems can often be tricky as several issues can arise. To avoid possible complications during the data import, ensure that the shp file is free of topological errors – you can use the Geometry Validity tool in QGIS to test this:
The tool will report all encountered errors and will highlight/zoom to the selected issue. Edit the shp file and resolve the reported issues.
It also helps to unproject the data to EPSG:4326 (WGS84). You can do this from QGIS by selecting Save As (from the right-click context menu on the layer in question):
In the Save As dialogue, select EPSG:4326 – WGS 84 as the output CRS:
Now we are ready to import the data. In http://*youraddress*.georams.co.za/layers, click on the Upload Layers button.
Drag and drop shp file members to the grey block (or use the file browse). You need to add the main files from the shp file: .shp, .dbf, .shx, .prj
Click on Upload Files.
On a successful upload, you should be greeted with the following:
With a successful upload, the tool has:
- created a new table in PostgreSql
- converted and inserted the data from the shp file into the table
- published the table as a new Geoserver layer
- assigned a default style to the layer
- synchronised the new layer with GeoRAMS
You can now capture metadata for the layer and manage the layer’s styles.
If it looks like it gets stuck, or returns an error, check the messages in Geoserver’s Import Data utility.