PostgreSQL

To open a read-only view of a PostgreSQL database table, select Add Overlay > Databases > View Points > PostgreSQL and click Next.

Click Next to open the Connection window:


Select one of the Saved connections or create a new connection by entering relevant database details. Enable Save Connection to save for future use. Click Next to open Recordset options.

Option Description
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 arrow to add the selected column to the chosen list. If a table is selected, all its columns will be added by default. The Remove arrow 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, you can enter existing property names (e.g. _shape$) to redefine the created items' properties.

Assigning a column to be used for hyperlinks

Scroll the Selected table/columns pane horizontally to see the Alias column. 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 Nextto open the View Points options.

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

Point Configuration

X Field/Y Field: Use the drop-down boxes to select the column to use for X / Y values.

XY Units Linear: X/Y values use Linear units. This will usually be the case in Orthogonal coordinate reference systems, for example OS National Grid. Linear units include meters, kilometers, miles, yards and more. Select the unit from the drop-down box.

XY Units Angular: X/Y values use Angular units and are used in conjunction with Latitude/Longitude coordinate reference systems. Angular units include radians, DMS, gradians and more. Select the unit from the drop-down box.

The value in the drop-down determines the format SIS Desktop expects from the datasource. SIS Desktop will then convert and display the points in degrees.

When selecting DMS be aware that SIS Desktop uses a comma 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 comma with another character (for e.g. double-quotes) to get DMS.

Create 'Empty' Items for unusable coordinates Enable this option to create an Empty Item if one or more of the coordinates could not be parsed correctly.

Optional Configuration

ID FieldL: If one of the columns contains unique positive integer values, you can use that column for the _id& property. This can help when writing GISLink customisations or SIS ActiveX applications to coordinate 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: Enter a custom name to override the overlay name.

Theme: Allows you to select a Default theme.

More Properties... Click to modify the Coordinate system and Scale. Scale is the default viewing scale for this dataset. It affects how Text items convert their point heights into world sizes.

Feature Table is used 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. The Properties... button opens the Cadcorp View Points dialog, which displays all properties of the overlay about to be created.

Click Finish on the main dialog to create and display a View Points database table for a PostgreSQl file.