Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


  >  Docs Center  >  Libraries  >  ASTROLIB  >  DBSORT

DBSORT

DBSORT

Name


      DBSORT

Purpose


      Routine to sort list of entries in data base

Calling Sequence


      result = dbsort( list, items , [ REVERSE = ])

Inputs


      list - list of entry numbers to sort
              -1 to sort all entries
      items - list of items to sort (up to 9 items)

Output


      result - numeric vector giving input list sorted by items

Optional Keyword Input


      REVERSE - scalar or vector with the same number of elements as the
        the number of items to sort. If the corresponding element of REVERSE
        is non-zero then that item is sorted in descending rather than
        ascending order.

Example


      Sort an astronomical catalog with RA as primary sort, and declination
      as secondary sort (used when RA values are equal)
          IDL> NEWLIST = DBSORT( -1, 'RA,DEC' )
      If for some reason, one wanted the DEC sorted in descending order, but
      the RA in ascending order
          IDL> NEWLIST = DBSORT( -1, 'RA,DEC', REV = [ 0, 1 ] )

Method


      The list is sorted such that each item is sorted into
      asscending order starting with the last item.

Common Blocks


      DBCOM

Procedures Used


      ZPARCHECK, BSORT, DBEXT, DB_ITEM

History


      VERSION 1 D. Lindler Oct. 86
      Added REVERSE keyword W. Landsman August, 1991
      Avoid use of EXECUTE() for V6.1 or later W. Landsman Dec 2006
      Assume since V6.1 W. Landsman June 2009
      Add TEMPORARY call W. Lnadsman July 2009



© 2018 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us