Name

selectbylocation — Return a selection of records based on a proximity to selected features in a second data source.

Syntax

selectbylocation(expression, source, operator, distance)
              

The SELECTBYLOCATION function has the following arguments.

expression

A quoted string that contains an expression to be evaluated against the source data set.

source

The short name of the source data set.

operator

The name of the spatial operator being applied. Valid values are 'INTERSECTS' or 'WITHIN'.

distance

The distance to search in conjuntion with the spatial operator.

Description

This function will calculate the selection of records based on a proximity to selected features in a second data source. The selection is returned as a selection set.

The current and source data tables must be GeoRelationalStores.

Examples

Formula

Description

Result

selectbylocation('Type = \'HQ\'', points, 'WITHIN', 1000)

select all features from the point dataset where Type = 'HQ'. These features will be buffered by 1000 units. The resulting buffer polygon(s) will be used to test features from source dataset. All source polygon features that are within the buffer will be included in the selected set.

Note that the quote characters within the quoted query must be escaped.

selection set