IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 40377 for trunk


Ignore:
Timestamp:
Mar 26, 2018, 1:03:28 PM (8 years ago)
Author:
eugene
Message:

add option to limit merged objects to matched objects

Location:
trunk/Ohana/src/dvomerge
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/dvomerge/include/dvomerge.h

    r39926 r40377  
    5555int    MATCH_BY_EXTERN_ID;
    5656
     57int    ONLY_MATCHES;
     58
    5759int    MATCHED_TABLES;
    5860int    RESET_STARPAR;
  • trunk/Ohana/src/dvomerge/src/args.c

    r39926 r40377  
    8686  }
    8787
    88   /* extra error messages */
     88  /* match images in the src and tgt database tables by their externID values (otherwise by time and photcode) */
    8989  MATCH_BY_EXTERN_ID = FALSE;
    9090  if ((N = get_argument (*argc, argv, "-match-by-extern-id"))) {
    9191    MATCH_BY_EXTERN_ID = TRUE;
     92    remove_argument (N, argc, argv);
     93  }
     94  /* add objects from input to output database only if they match an existing object */
     95  ONLY_MATCHES = FALSE;
     96  if ((N = get_argument (*argc, argv, "-only-matches"))) {
     97    ONLY_MATCHES = TRUE;
    9298    remove_argument (N, argc, argv);
    9399  }
     
    373379  }
    374380
    375   /* extra error messages */
     381  /* match images in the src and tgt database tables by their externID values (otherwise by time and photcode) */
    376382  MATCH_BY_EXTERN_ID = FALSE;
    377383  if ((N = get_argument (*argc, argv, "-match-by-extern-id"))) {
    378384    MATCH_BY_EXTERN_ID = TRUE;
     385    remove_argument (N, argc, argv);
     386  }
     387  /* add objects from input to output database only if they match an existing object */
     388  ONLY_MATCHES = FALSE;
     389  if ((N = get_argument (*argc, argv, "-only-matches"))) {
     390    ONLY_MATCHES = TRUE;
    379391    remove_argument (N, argc, argv);
    380392  }
  • trunk/Ohana/src/dvomerge/src/dvomergeUpdate_catalogs.c

    r39926 r40377  
    330330    if (MATCHED_TABLES)      { strextend (&command, "-matched-tables"); }
    331331    if (MATCH_BY_EXTERN_ID)  { strextend (&command, "-match-by-extern-id"); }
     332    if (ONLY_MATCHES)        { strextend (&command, "-only-matches"); }
    332333    if (UPDATE_CATFORMAT)    { strextend (&command, "-update-catformat %s", UPDATE_CATFORMAT); }
    333334    if (UPDATE_CATCOMPRESS)  { strextend (&command, "-update-catcompress %s", UPDATE_CATCOMPRESS); }
  • trunk/Ohana/src/dvomerge/src/merge_catalogs_old.c

    r40291 r40377  
    406406  /** incorporate unmatched image stars, if this star is in field of this catalog **/
    407407  /* these new entries are all written out in UPDATE mode */
    408   for (i = 0; i < Nstars; i++) {
     408  for (i = 0; (i < Nstars) && !ONLY_MATCHES; i++) {
    409409    off_t N = N1[i];
    410410
Note: See TracChangeset for help on using the changeset viewer.