PostGIS

Adds an editable dataset that stores items in a PostGIS-enabled PostgreSQL database.

Select Home > Add Overlay > Databases > PostGIS.

Click Next to open the Connection window:

Select one of the Saved connections.

Alternatively create a new connection by entering relevant database details. Enable Save Connection to save for future use.

Click Next to select a database connection type.

Click Next.

The Recordset dialog will be displayed:

Dataset Tables/Columns

Displays the tables and columns available in the connected database. Highlight the required table or column in this pane. Database names are case sensitive, use upper-case names for interoperability.

Add/Remove

Click the Add button to add the selected column to the chosen list. If a table is selected then all its columns will be added.

The Remove button removes a selected column from the Selected columns list.

Selected columns

Displays the selected database table columns. Move the horizontal slider to the right to reveal the Alias column:

This column is used to map the database column name onto a SIS property/attribute name. If the recordset is being used as part of a database-based dataset, then you can enter existing property names (e.g. _shape$) to redefine the created items' properties.

Assigning a column to be used for hyperlinks:

If you wish to do this then when you have clicked Add, and the selected table/columns appear in this pane, scroll the pane horizontally to show the Alias column. In the column that is to contain the hyperlink data rename the Alias to _URI$ before completing the Wizard.

When the dataset is displayed in the Map Window you can select a point and use the Open Link command to launch the associated hyperlink.

SQL Where

Enter the SQL syntax clause that can be used to join several different tables, or restrict which rows are imported. Do not use the WHERE SQL keyword.

Click Next.

The View Points dialog will be displayed:

Note: The X Field and Y Field parameters of the View Points dialog are mandatory, all other parameters on this dialog are optional.

Point Configuration

X Field/Y Field

The column to use for X/Y values.

XY Units

Linear

This will usually be the case in Orthogonal coordinate systems, such as OS National Grid.

Angular

This will usually be the case in Latitude/Longitude coordinate systems.

Select from: Coordinate Reference System units, degrees, radians, DMS, gradians or DM.

Note: The value in the drop-down informs SIS Desktop the format to expect from the datasource. SIS will now convert and display the points in degrees. When selecting DMS be aware a comma is used as a separator within its coordinates i.e. x,y,z. If your datasource format is DD,MM,SS.S only the DD part will be used, therefore you need to replace the coma with another character such as double-quotes (any character except a coma) to get DMS.

Create 'Empty' Items for unusable coordinates

Check this tickbox if you want an Empty Item to be created if one or more of the coordinates could not be parsed correctly.

Optional configuration

ID Field

If one of the SQL columns contains unique positive integer values, you can use that column for the _id& property. This can help when writing GisLink customisations or SIS control applications to co-ordinate SIS items and other database data.

Z Field

The column to use for Z values or height above sea-level. If you leave this field empty, then 2D points will be created.

Z Units (linear)

The units of the Z coordinates in the database.

Overlay Configuration

Name

This displays the overlay name which may be changed if required..

Theme

This drop-down shows any Themes associated with the overlay:

If you do not want to modify the dataset's Coordinate Reference System, Scale, etc. click Finish.

If you do want to make some changes click the More Properties... button.

If you click the More Properties... button the View Points dialog will be displayed:

Coordinates:

Displays the coordinate reference system that the dataset items are defined in. To view or edit the coordinate system details drop-down the combo-box list, and press the right arrow at the bottom to display the Coordinate Reference System dialog.

Feature Table:

This is the feature table to use for feature-coded items in this dataset. Feature-coded items get information about their feature code either from this feature table, or, if set, their own Feature Table property.

Scale:

The default viewing scale for this dataset. This will affect how Text items convert their point heights into world sizes.

Properties... button

Click the Properties... button to display the resizable Cadcorp View Points dialog showing the values of properties which may be viewed or edited:

Click OK to return to the View Points dialog.