>  Docs Center  >  Libraries  >  Buie  >  GETNEWID
Libraries

GETNEWID

GETNEWID

Name


  getnewid

Purpose (one Line Only)


  Obtain an id that can be used for a new object based on database information

Description


  When a new object is discovered (or you think it is), it needs a unique
    name for identification. The scheme implemented here tries to accomodate
    other methods for doing this that were used in the past that did not
    rely on a central database to hold the information. It also has to work
    with the restrictions imposed by Larry Wasserman's various ephemeris tools.
  An object ID is thus defined to be a two character alphabetic (upper case
    only) prefix followed by 1 or more numeric digits. There have been cases
    in the past where the number was not padded to a constant length. For
    example, there is an object defined as MA1 in the same sequence where there
    is an object named MA1001. In this case the number of digits in the
    sequence varies. This type of case is NOT supported by this program.
    Instead, a sequence is defined by its prefix, and how many zero-padded
    digits it contains. In principle there is no upper limit to the number
    of digits you can use but in practice there is a limit imposed by other
    programs and data file structures. I think the real upper limit is
    six digits but this limit is not imposed by this program.
  Therefore, a sequence of IDs is always finite and the number of IDs in
    a sequence depends on the number of digits. As long as the prefix was
    not used for the older, obsolete scheme, you can have multiple sequences
    for the same prefix. The difference will be in length. Thus MA100 would
    be in a different sequence from MA1000 (3 digits vs. 4 digits).
  A sequence supported by this routine is defined by the prefix and the
    number of digits. Optionally, a lower bound to the numeric tag can
    be specified but this does not change the definition of a sequence. It
    is just provided as a helpful tool for working in different sections of
    a sequence.
  When asking for a new id, the sequence definition is used to query for the
    currently defined objects. From this and the minimum value requested,
    this program will find the lowest number that is not already used.

Category


  Astrometry

Calling Sequence


  getnewid,prefix,digits,newid

Inputs


  prefix - Two character uppercase alphabetic string
  digits - Number of digits in the id

Optional Input Parameters


Keyword Input Parameters


  MINVAL - Lowest number to consider in the seqeunce (default=0)
  DBNAME - Name of database to use (default='gen')
  TBLNAME - Name of tabe to use (default='ast')

Outputs


  newid - The new ID to use (string). This does not actually get put into
              the database so it doesn't really exist until you use it and
              save it to the database.

Keyword Output Parameters


Common Blocks


Side Effects


Restrictions


Procedure


Modification History


  2012/01/08, Written by Marc W. Buie, Southwest Research Institute



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us