WHERE clause

 The WHERE clause Interface is used to define the restriction used to generate a new dataset. The restriction can involve  one or more datasets, using standard and/or spatial attributes (vertical tabs). The list of operators supported is adjusted to the type of attributes involved. 

The operators  <,>,<=,>=,<>,=, LIKE, NOT are used with standard attributes comparison, and the spatial operators such as ST_UNION, ST_INTERSECTION, ST_AREA among others are used to operate over geometric attributes.

To define a restriction based on Attributes follow the steps:

  1. Select restriction type on the vertical tab:
  2. Define a restriction by selecting:
    1.  Property
    2.  Operator  (>, >=, <, <=, = )
    3.  Value - it can be a property of other dataset or a value among all values of the property chosen.
  3. Click on add part of restriction to add this combination (property x operator x value)  to the Table/SQL tabs bellow.
  4. On the frame Table/SQL  it is possible to handle the restriction adding more clauses, removing one or all lines, or checking the SQL generated:
    1. Check the list of restrictions.
    2. Define the connector (and, or, nothing)  and the next restriction.
    3. Clear all restriction using clear all restricition or only one line using  remove.
    4. Optionally, change to SQL tab to see the restriction generated in  SQL.
  5. Go to the step 1 to define the next part of the restriction as necessary.
          attribute restriction


To define  a restriction based on spatial attributes follow the steps:
  1. Select restriction type on the vertical tab:
  2. Define a restriction by selecting:
    1.  Property - geometry attribute of the selected dataset
    2.  Operator (ST_Contains, ST_Union, ST_Crosses, ...)
    3.  Layer - select the layer to be confronted with the restriction defined.
    4. Use Selected Objects - check this option if the goal is to apply the restriction only over the selected objects in the layer displayed.
  3. Click on add part of restriction to add this combination (property x operator x value)  to the Table/SQL tabs bellow.
  4. On the frame Table/SQL  it is possible to handle the restriction adding more clauses, removing or checking the SQL generated:
    1. Check the list of restrictions.
    2. Define the connector (and, or, nothing)  and the next restriction.
    3. Clear all restriction using clear all restricition or only one line using remove.
    4. Optionally, change to SQL tab to see the restriction generated in  SQL.
  5. Go to the step 1 to define the next part of the restriction as necessary.
            spatial restriction example