Database Scripts

The results of a FindIT search are written to a database. To build the required tables in the appropriate database, use the scripts below.

Two tables are created:

  1. finditsearch
  2. finditconstraints

 

Database tables are created and populated as below:

Table name: SEARCH

Data Type

Description

SEARCHTIME

Datetime (SQL) or timestamp (PostGIS)

Date and Time of the search

POLYGONID

Number (auto increment)

Auto-generated ID for the drawn element (circle, polygon etc) used for the search.

GEOMETRY

Geometry

Spatial object of the polygon

CONSTRAINTS

Boolean

TRUE if items were found in the overlays and FALSE if no items found.

Here is an example:

Table name: CONSTRAINTS

Data Type

Description

POLYGONID

Number

Unique auto-generated ID for the drawn element (circle, polygon etc) used for the search.

CONSTRAINTLAYER

String

Column to denote the layer the result has been found in. This is layer from the FindIT SWD.

CONSTRAINTIDCOLUMN

String

Column containing the actual results. This column lists items found in the searched area on any particular layer.

Here is an example:

The tables are linked by the POLYGONID. In the CONSTRAINTS table all of the constraints against each POLYGONID are listed in individual rows. This is to cater for an unknown number of constraints being returned for each search.

After making the changes restart the IIS application pool.

NEXT: PDF templates for FindIT