Help for IBISCLST3

PURPOSE:

"IBISCLST3" is a VICAR applications program that reads an IBIS file
containing (x, y) points and calculates clusters for them. Cluster
membership means that a point is within a specified line and samp
distance from the first cluster member. Line/samp and lon/lat cluster
centroids are optionally calculated and stored in the IBIS file.

The clustering algorithm is:
  for each point in the ordered input IBIS rows
    if it is not in a cluster
      create a new cluster
      add the point to the new cluster as its anchor
        for each remaining point in IBIS order
          if the remaining point is within dline and dsamp of the anchor point
            add the remaining point to the new cluster

The input file must include the (x, y) point position and an extra
column for storing the cluster ID. All referenced IBIS file values
must be double-precision floats. The cluster ID is an integer, but is
written as a double-precision float.

EXECUTION:

    IBISCLST3 INP=IFILE DLINE=YDIST DSAMP=XDIST SAMPCOL=SC LINECOL=LC CLUSTCOL=CLST PARMS

where

    INP   is the input IBIS file that will be modified
    XDIST is the maximum samp distance between points
    YDIST is the maximum line distance between points
    SC    is the column of point sample values
    LC    is the column of point line values
    CLST  is the column for storing the cluster ID
        SAMPCTR=SCTR LINECTR=LCTR
	and
        LONCOL=LONCOL LATCOL=LATCOL LONCTR=LONCTR LATCTR=LATCTR
        where
            SCTR is the column for storing the cluster centroid sample
            LCTR is the column for storing the cluster centroid line
            LONCOL is the column of longitude values
            LATCOL is the column of latitude values
            LONCTR is the column for storing the cluster centroid longitude
            LATCTR is the column for storing the cluster centroid latitude

PERFORMANCE:

The clustering algorithm calculates distances between point pairs
until cluster membership is discovered, possibly calculating all
point pairs when there are no multi-point clusters. So the 
complexity is O(n^2).

WRITTEN BY:  W. Bunch 2016-06-16

COGNIZANT PROGRAMMER: W. Bunch

REVISIONS:  
    2016-06-16 WLB - Initial version.
    2016-09-14 WLB - Fixed fencepost bug; migrated to MIPL.


PARAMETERS:


INP

Input/output IBIS file.

DSAMP

Maximum samp distance between points.

DLINE

Maximum line distance between points.

SAMPCOL

IBIS sample value column.

LINECOL

IBIS line value column.

CLUSTCOL

IBIS cluster ID column.

SAMPCTR

IBIS centroid sample column.

LINECTR

IBIS centroid line column.

LONCOL

IBIS longitude column.

LATCOL

IBIS latitude column.

LONCTR

IBIS longitude centroid column.

LATCTR

IBIS latitude centroid column.

See Examples:


Cognizant Programmer: