Maptitude GISDK Help

SelectByCoord()

Summary

Selects the map feature nearest to a coordinate.

 

Changes

Optional options array introduced in Version 5.0.

 

Syntax

n_selected = SelectByCoord(string set_name, string operation, coord coordinate, real threshold [, array options])

 

Argument Contents
set_name The name of the selection set
operation The operation to perform, as indicated below
coordinate The coordinate at which to search
threshold A search radius around the coordinate, in map units

 

Operation Meaning
several Replaces the contents of the selection set
less Removes features from the selection set
more Adds features to the selection set
subset Selects a subset of the selection set

 

Option Type Contents
Inclusion String "Enclosed" or "Intersecting", overriding the current setting; for more information, seeSetSelectInclusion()
Display Boolean "True" or "False" overriding the current setting; for more information, seeSetSelectDisplay()
Auto Redraw Boolean "True" or "False" overriding the current setting; for more information, seeSetSelectAutoRedraw()
Source And String A selection set on the current layer that records must be in to be selected
Source Not String A selection set on the current layer that records must not be in to be selected

 

Returns

An integer indicating the number of records in the selection set. This is always 1 (the nearest was found) or 0.

 

Notes

Example

n = SelectByCoord("Selection", "Several", Coord(-75000000, 45000000), 1.5)

 

Error Codes

Error Type Meaning
Error The set name or the operation type is invalid.
NotFound No features fall within the threshold distance of the coordinate.

 

See Also

Function Summary
SelectByShape() Selects the map features located inside a shape
SelectByCircle() Selects map features that are located within a circle

 

 

©2025 Caliper Corporation www.caliper.com