![]() | ![]() | ![]() | Groups |
Groups are very useful in cataloguing the available data and in operating on sets of items. The possible operations are
As groups are also used by GPSMan to present the results of a search as described below, searching for items is an effective way of creating a group with items that are then operated upon from the group window.
Groups can also be created for the items that are or are
not currently displayed on the map. This is done using the
Make Group
entry of the Items
menu-button on the map
window.
When getting laps from the receiver, runs will be stored as groups.
A group contains
a certain number of data items and is
represented internally as set of item names (together with their
types). Operations on a group may fail or only partially succeed if
one of its elements is not currently in the data-base. Groups can have other groups as elements but one group
cannot be an element of itself even if indirectly (in technical terms:
groups are well-founded sets).
Some operations on a group will act not only on its elements but also
on the elements of all its descendants. In this case the first step is
to collect all these elements by a recursive inspection of the group
descendants. Clearing from the map an item
that belongs to a group
that has been displayed will not affect the display-state of the
group. To be sure that all the elements of a group are actually
displayed, the user should clear the group from the map and then display
it again.
Deleting from or adding items to a group
will not
affect their display-state.
Forgetting
a group
will delete permanently the group
from the data-base but not its elements. This operation is not
prevented by the fact that any of its elements cannot be cleared from
the map.
Forgetting a group and all its elements
will delete permanently not only the group but also all
its elements
(recursively, i.e., including the elements of groups in the group).
The group is deleted even if some of its elements cannot be cleared
from the map and are therefore not deleted.
Saving a group
(to a GPSMan file) will save all the
information on the group and on its elements.
Creating an average waypoint from the waypoints in a group
can be made from the group window. The coordinates of the new waypoint
will be the averages of the latitudes, longitudes and altitudes of
waypoints in the group and its descendants (recursively).
Changing the data of waypoints in a group
can also be made from the group window in what concerns:
Clusters of waypoints
can be created from a group by taking the waypoints in it (and its
descendants, recursively) as centres of the clusters and searching the
data-base for waypoints that fulfil a selected condition for each
centre. The conditions that can be tested are: that the waypoint is
within a given distance range of the centre, or that the waypoint
belongs to the quadrangle of given latitude and longitude ranges whose
middle-point is the centre. It is obvious that the first condition
will be much slower to evaluate than the second, and therefore making
clusters based on quadrangles should be preferred when the number of
waypoints currently defined is large. Each cluster will be created as
a group: its name is of the form Input/output operations on the elements of a group
allow for selecting which items of which types to read or write. In
general the user will choose the groups and the item types for the
operation. Then GPSMan collects in a list the names of the items of
the given types that belong to the selected groups and that are
currently in the data-base. This list of names is used to
perform the I/O operation.
Selecting the "Group" type means that the search for items will be
done in the groups that are elements of the selected groups,
recursively. In more technical terms, the resulting list may be seen
as a flattening of the group structure. In no case the list of names
will contain names of groups.
Details of each specific operation are as follows:
In some cases it is useful to transfer not only the elements of the
selected groups, but also the elements of any of their
descendants. For this to take place select the type Group along with
the type of items to be transferred.The
names of elements in the group window have different colours depending
on their being in the data-base. The colour of a name is only updated
when clicking or double-clicking on it, and so it can be
wrong.
The group window may have at a certain time more than one
selected element. When this happens, a replace will act on the first
selected element (from the top of the list), deleting will act on all
selected elements. Inserting a new element will always put it after
all the elements of the same type.
This property can be explained as follows.
Groups that are elements of a group G can be seen as its sons.
These groups may have their own sons which are called the grand-sons of G and that, in turn, may have sons (the grand-grand-sons of G), and so on. All the sons, grand-sons,
grand-grand-sons, and so on, of a group form the set of its descendants.
A group is well-founded by not being its own descendant.
All the waypoints in the group and its descendants (recursively) will
change to the (same) selected value. If one of the waypoints is being
edited, the edit window will also be changed. In the case of the
position format or the datum the position will revert to its initial
value (when the edit window was created). In the case of the
symbol, the change will be reflected on the map if necessary.
Cluster
n, and its remark
has the name of the centre and either the quadrangle dimensions, or
the distance range.
Examples of using a group when putting are as follow. For
transferring to the receiver the waypoints that belong to some groups,
select the type waypoint and then select the relevant groups. This
will result in an inspection of each selected group for gathering the
waypoints in its list that are currently in the data-base. All these
waypoints will be transferred.
GPSMan User Manual
©1998-2009 Miguel
Filgueiras,
mig_at_ncc.up.pt
, LIACC & DCC Faculdade de Ciências, Universidade do Porto
Groups