Maptitude GISDK Help |
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:
Open a geographic file of states
Open a dBASE file containing sales information by state
Join the state layer to the dBASE file to create a joined view
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 |
Creates a new, empty set on the current view |
|
Deletes a set from the current view |
|
Returns information on how features in a selection set are displayed on a map |
|
Returns the label used in the legend for the list of sets belonging to a layer |
|
Gets the number of records in a view or selection set |
|
Gets an array of record handles for a selection set |
|
Indicates how maps are updated during selection operations |
|
Indicates whether selection operations update maps automatically |
|
Indicates the inclusion status for spatial selection |
|
Gets the number of records in a set in the current view |
|
Gets an array of the IDs of elements in a set |
|
Gets the position of a selection set on the current map layer |
|
Gets a list of the names of selection sets for a view |
|
Gets the range of scales at which a selection set displays (autoscale) |
|
Gets the scope of the features in a selection set |
|
Tests whether a record is a member of a selection set |
|
Changes the name of a selection set |
|
Changes how features in a selection set are displayed on a map |
|
Changes the label used in the legend for the list of sets belonging to a layer |
|
Controls how maps are updated during selection operations |
|
Controls whether selection operations update maps automatically |
|
Sets the inclusion status for spatial selection |
|
Sets the position of a selection set on the current map layer |
|
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 |
Creates multiple selection sets of records, using the classification technology of CreateTheme() |
|
Creates multiple selection sets of records, using an existing theme |
|
Selects all the records in the current view |
|
Selects map features that are located within a circle |
|
Selects the map feature nearest to a coordinate |
|
Selects map features from a list of feature IDs stored in a file |
|
Selects map features from a list of feature IDs |
|
Selects map features within the current map window |
|
Selects records based on an SQL query |
|
Selects records based on an SQL query that is stored in a file |
|
Selects the map features located within a scope |
|
Selects the map features located inside a shape |
|
Selects map features located in or near features in another layer or selection set |
|
Removes all records from a selection set |
|
Adds the current record to a selection set |
|
Selects a feature in the current layer nearest to each feature in another layer or selection set |
|
Removes the current record from a selection set |
|
Verifies whether an SQL query has the correct syntax |
Here are GISDK functions for combining or reorganizing selection sets:
GISDK Function |
Summary |
Selects features that are in all of several input selection sets |
|
Selects features that are in any of several input selection sets |
|
Selects features that are in only one of several selection sets |
|
Selects all features that are not part of another selection set |
|
Copies a selection set |
|
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 |