IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38755


Ignore:
Timestamp:
Sep 18, 2015, 6:44:27 AM (11 years ago)
Author:
eugene
Message:

bugfixes : load photcodes and open files r/w

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150625/Ohana/src/dvomerge/src/dvorepairDeleteImagesByExternID.c

    r38753 r38755  
    3030  Image *image;
    3131  char *imageFilename = NULL;
     32  char filename[DVO_MAX_PATH];
    3233
    3334  N = get_argument (argc, argv, "-delete-images-by-extern-id");
     
    5051  char *catdir = argv[1];
    5152  char *delList = argv[2];
     53
     54  sprintf (filename, "%s/Photcodes.dat", catdir);
     55  if (!LoadPhotcodes (filename, NULL, FALSE)) {
     56    fprintf (stderr, "error reading photcodes from %s\n", catdir);
     57    exit (1);
     58  }     
    5259
    5360  // load the image data
     
    219226      if (!inlist[0].regions[i][0].table) continue;
    220227
    221       char filename[DVO_MAX_PATH];
    222228      snprintf (filename, DVO_MAX_PATH, "%s/%s.cpt", catdir, inlist[0].regions[i][0].name);
    223229
     
    230236      catalog.Nsecfilt  = GetPhotcodeNsecfilt ();
    231237     
    232       if (!dvo_catalog_open (&catalog, inlist[0].regions[i], VERBOSE, "r")) {
     238      if (!dvo_catalog_open (&catalog, inlist[0].regions[i], VERBOSE, "w")) {
    233239        fprintf (stderr, "ERROR: failure reading catalog %s\n", catalog.filename);
    234240        exit (1);
Note: See TracChangeset for help on using the changeset viewer.