icsm-au / DynAdjust

Least squares adjustment software
Apache License 2.0
72 stars 36 forks source link

Add an option to extract stations and measurements from a contiguous network #217

Closed rogerfraser closed 1 year ago

rogerfraser commented 1 year ago

Brief description An enhancement to import is required to enable the extraction of a contiguous network of stations and measurements, which may be part of a larger, non-contiguous network.

Background import presently provides an option (--import-block-stn-msr arg) which, when supplemented with a specific block number (arg), extracts all stations and measurements from the specified block pertaining to segmented network. This implies that the network has been previously imported and segmented as follows:

$>import -n mynet stations.stn measurements.msr
$>segment mynet

By default, if a network is not contiguous, the segment command above will aggregate non-contiguous (or isolated) networks together. To force the separation of isolated blocks, the segment command must be supplemented with the option --contiguous-blocks 0:

$>import -n mynet stations.stn measurements.msr
$>segment mynet --contiguous-blocks 0

Running this command will produce the file mynet.seg, which will tabulate the list of segmented blocks and the station and measurement indices belonging to each block. If the network is non-contiguous, the Network ID column will contain a list of numbers ranging from 0 to as many non-contiguous networks that have been identified.

Once network has been segmented, it is possible to export all stations and measurements from a segmented block, whether part of a contiguous or non-contiguous network. This can be achieved via the following sequence of commands (e.g. using block number 5):

$>import -n mynet stations.stn measurements.msr
$>segment mynet --contiguous-blocks 0
$>import -n mynet --import-block-stn-msr 5 --export-dna

Basic requirements An option is required to extract all stations and measurements from a single, contiguous network using an integer in the Network ID column.

Priority priority 1 (high)

rogerfraser commented 1 year ago

Addressed by #219