Maptitude GISDK Help

Selection Sets

GISDK provides many GISDK functions for creating, manipulating, and working with selection sets. GISDK lets you create and maintain any number of selection sets on every layer or view (for an introduction to Views, see Tables and Views). Selection sets are identified by name, and set names must be unique within a layer or view.

 

For example, in standard Maptitude every layer has a selection set named Selection. When you create another set, the first new set is called Selection:1, then Selection:2, and so on.

 

Selection sets on any view that is linked to a layer are available on any other view that is linked to the same layer. For example, suppose you do the following in Maptitude:

Any selection set you create on the joined view can also be used to access records in the states layer.

 

Most selection GISDK functions support four different selection methods, as described in the following table:

 

Method

What it does

Several

Replaces the existing set with the new selection

More

Adds the new selection to the existing set

Less

Removes the new selection from the existing set

Subset

Selects from the existing set those records that are in the new selection

 

All selection GISDK functions work on the current layer or view. You must set the layer or view before using the selection GISDK functions. Selection GISDK functions that do geographic searching on a layer require that the layer be in a map, not just in the workspace.

 

Here are GISDK functions for creating and managing selection sets:

 

GISDK Function

Summary

CreateSet()

Creates a new, empty set on the current view

DeleteSet()

Deletes a set from the current view

GetDisplayStatus()

Returns information on how features in a selection set are displayed on a map

GetLayerSetsLabel()

Returns the label used in the legend for the list of sets belonging to a layer

GetRecordCount()

Gets the number of records in a view or selection set

GetRecords()

Gets an array of record handles for a selection set

GetSelectAutoRedraw()

Indicates how maps are updated during selection operations

GetSelectDisplay()

Indicates whether selection operations update maps automatically

GetSelectInclusion()

Indicates the inclusion status for spatial selection

GetSetCount()

Gets the number of records in a set in the current view

GetSetIDs()

Gets an array of the IDs of elements in a set

GetSetPosition()

Gets the position of a selection set on the current map layer

GetSets()

Gets a list of the names of selection sets for a view

GetSetScale()

Gets the range of scales at which a selection set displays (autoscale)

GetSetScope()

Gets the scope of the features in a selection set

IsMember()

Tests whether a record is a member of a selection set

RenameSet()

Changes the name of a selection set

SetDisplayStatus()

Changes how features in a selection set are displayed on a map

SetLayerSetsLabel()

Changes the label used in the legend for the list of sets belonging to a layer

SetSelectAutoRedraw()

Controls how maps are updated during selection operations

SetSelectDisplay()

Controls whether selection operations update maps automatically

SetSelectInclusion()

Sets the inclusion status for spatial selection

SetSetPosition()

Sets the position of a selection set on the current map layer

SetSetScale()

Sets the range of scales at which a selection set displays (autoscale)

 

Here are GISDK functions for changing the elements in a selection set:

 

GISDK Function

Summary

CreateGroup()

Creates multiple selection sets of records, using the classification technology of CreateTheme()

CreateGroupByTheme()

Creates multiple selection sets of records, using an existing theme

SelectAll()

Selects all the records in the current view

SelectByCircle()

Selects map features that are located within a circle

SelectByCoord()

Selects the map feature nearest to a coordinate

SelectByIDFile()

Selects map features from a list of feature IDs stored in a file

SelectByIDs()

Selects map features from a list of feature IDs

SelectByMapWindow()

Selects map features within the current map window

SelectByQuery()

Selects records based on an SQL query

SelectByQueryFile()

Selects records based on an SQL query that is stored in a file

SelectByScope()

Selects the map features located within a scope

SelectByShape()

Selects the map features located inside a shape

SelectByVicinity()

Selects map features located in or near features in another layer or selection set

SelectNone()

Removes all records from a selection set

SelectRecord()

Adds the current record to a selection set

SelectNearestFeatures()

Selects a feature in the current layer nearest to each feature in another layer or selection set

UnselectRecord()

Removes the current record from a selection set

VerifyQuery()

Verifies whether an SQL query has the correct syntax

 

Here are GISDK functions for combining or reorganizing selection sets:

 

GISDK Function

Summary

SetAND()

Selects features that are in all of several input selection sets

SetOR()

Selects features that are in any of several input selection sets

SetXOR()

Selects features that are in only one of several selection sets

SetInvert()

Selects all features that are not part of another selection set

SetCopy()

Copies a selection set

SortSet()

Sorts the records in a selection set based on the values of one or more fields

 

Many GISDK functions identify a selection set using a string containing the view or layer name, a vertical bar, and the set name.

 

// Set the fill color for all states to be white

SetFillColor("States|", ColorRGB(65535, 65535, 65535))

 

// Set the fill color for selected states to be red

SetFillColor("States|Selection", ColorRGB(65535, 0, 0))

 

Note that when these GISDK functions refer to the entire layer or view, the string contains the view name and a vertical bar.

 

 

©2025 Caliper Corporation www.caliper.com