IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17789 for trunk/ippTools/src


Ignore:
Timestamp:
May 23, 2008, 3:36:44 PM (18 years ago)
Author:
Paul Price
Message:

Adding option of faulting on generating warp overlaps.

Location:
trunk/ippTools/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/warptool.c

    r17782 r17789  
    525525
    526526    PXOPT_LOOKUP_STR(mapfile, config->args, "-mapfile", false, false);
     527    PXOPT_LOOKUP_STR(warp_id, config->args, "-warp_id", false, false);
     528    PXOPT_LOOKUP_STR(cam_id, config->args, "-cam_id", false, false);
     529    PXOPT_LOOKUP_S16(code, config->args, "-code", false, false);
    527530
    528531    if (!psDBTransaction(config->dbh)) {
     
    531534    }
    532535
    533     if (!parseAndInsertSkyCellMap(config, mapfile)) {
    534         psError(PS_ERR_UNKNOWN, false, "failed to inject mapfile: %s into the database", mapfile);
    535         // rollback
    536         if (!psDBRollback(config->dbh)) {
    537             psError(PS_ERR_UNKNOWN, false, "database error");
    538         }
    539         return false;
     536    if (code == 0) {
     537        if (!parseAndInsertSkyCellMap(config, mapfile)) {
     538            psError(PS_ERR_UNKNOWN, false, "failed to inject mapfile: %s into the database", mapfile);
     539            // rollback
     540            if (!psDBRollback(config->dbh)) {
     541                psError(PS_ERR_UNKNOWN, false, "database error");
     542            }
     543            return false;
     544        }
     545    } else {
     546        warpSkyCellMapInsert(config->dbh, (psS64)atoll(warp_id), NULL, NULL,
     547                             (psS64)atoll(cam_id), NULL, code);
    540548    }
    541549
  • trunk/ippTools/src/warptoolConfig.c

    r17782 r17789  
    207207    psMetadataAddStr(addoverlapArgs, PS_LIST_TAIL, "-mapfile", 0,
    208208            "path to skycell <-> imfile mapping file", NULL);
     209    psMetadataAddStr(addoverlapArgs, PS_LIST_TAIL, "-warp_id",  0,
     210            "set warp ID", NULL);
     211    psMetadataAddStr(addoverlapArgs, PS_LIST_TAIL, "-cam_id",  0,
     212            "set cam ID", NULL);
     213    psMetadataAddS16(addoverlapArgs, PS_LIST_TAIL, "-code",  0,
     214            "set fault code", 0);
    209215
    210216    // -scmap
     
    213219            "search by warptool ID", NULL);
    214220    psMetadataAddStr(scmapArgs, PS_LIST_TAIL, "-skycell_id", 0,
    215             "searcy by skycell ID", NULL);
     221            "search by skycell ID", NULL);
    216222    psMetadataAddStr(scmapArgs, PS_LIST_TAIL, "-tess_id", 0,
    217             "searcy by tess ID", NULL);
     223            "search by tess ID", NULL);
    218224    psMetadataAddU64(scmapArgs, PS_LIST_TAIL, "-limit",  0,
    219225            "limit result set to N items", 0);
Note: See TracChangeset for help on using the changeset viewer.