Ticket #4143: gcp_refinement_22669.diff

File gcp_refinement_22669.diff, 2.4 KB (added by goocreations, 5 years ago)
  • apps/gdalwarp.cpp

     
    7272gdalwarp [--help-general] [--formats]
    7373    [-s_srs srs_def] [-t_srs srs_def] [-to "NAME=VALUE"]
    7474    [-order n] [-tps] [-rpc] [-geoloc] [-et err_threshold]
    75     [-refine_gcps tolerance minimum_gcps]
     75    [-refine_gcps tolerance [minimum_gcps]]
    7676    [-te xmin ymin xmax ymax] [-tr xres yres] [-tap] [-ts width height]
    7777    [-wo "NAME=VALUE"] [-ot Byte/Int16/...] [-wt Byte/Int16]
    7878    [-srcnodata "value [value...]"] [-dstnodata "value [value...]"] -dstalpha
     
    232232        "Usage: gdalwarp [--help-general] [--formats]\n"
    233233        "    [-s_srs srs_def] [-t_srs srs_def] [-to \"NAME=VALUE\"]\n"
    234234        "    [-order n] [-tps] [-rpc] [-geoloc] [-et err_threshold]\n"
    235         "    [-refine_gcps tolerance minimum_gcps]\n"
     235        "    [-refine_gcps tolerance [minimum_gcps]]\n"
    236236        "    [-te xmin ymin xmax ymax] [-tr xres yres] [-tap] [-ts width height]\n"
    237237        "    [-wo \"NAME=VALUE\"] [-ot Byte/Int16/...] [-wt Byte/Int16]\n"
    238238        "    [-srcnodata \"value [value...]\"] [-dstnodata \"value [value...]\"] -dstalpha\n"
  • alg/gdal_crs.c

     
    10141014{
    10151015    double *padfResiduals;
    10161016    int nI, nIndex;
    1017     double dfThreshold, dfDifference, dfSampleResidual, dfLineResidual, dfSampleRes, dfLineRes, dfCurrentDifference;
     1017    double dfDifference, dfSampleResidual, dfLineResidual, dfSampleRes, dfLineRes, dfCurrentDifference;
    10181018    double dfE1, dfN1, dfE2, dfN2, dfEn;
    10191019 
    10201020    padfResiduals = (double *) CPLCalloc(sizeof(double),cp->count);
     
    10381038        padfResiduals[nI] = sqrt(dfSampleRes*dfSampleRes + dfLineRes*dfLineRes);
    10391039    }
    10401040 
    1041     dfThreshold = dfTolerance * sqrt( (dfSampleResidual + dfLineResidual) / (double) cp->count );
    1042  
    10431041    nIndex = -1;
    10441042    dfDifference = -1.0;
    10451043    for(nI = 0; nI < cp->count; nI++)
     
    10491047        {
    10501048            dfCurrentDifference = 0.0;
    10511049        }
    1052         if(dfCurrentDifference > dfDifference && dfCurrentDifference >= dfThreshold)
     1050        if(dfCurrentDifference > dfDifference && dfCurrentDifference >= dfTolerance)
    10531051        {
    10541052            dfDifference = dfCurrentDifference;
    10551053            nIndex = nI;