<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Ah, I read your message too fast. I see I added that in
<a class="moz-txt-link-freetext" href="https://github.com/OSGeo/PROJ/commit/f50221ed6606a67ef0354cacd449f02aca3faba7">https://github.com/OSGeo/PROJ/commit/f50221ed6606a67ef0354cacd449f02aca3faba7</a>.
      Unfortunately there is no corresponding test and my memories have
      obviously vanished. This is perhaps a situation where
      --spatial-test intersects would return a non-ballpark operation
      and without it a ballpark operation. Although I suspect this might
      be more subtle than that.<br>
    </p>
    <div class="moz-cite-prefix">Le 20/01/2023 à 20:51, Javier Jimenez
      Shaw a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CADRrdKsQ_e9wCG3eDwMW=eJQCkdpp+RPsFMmw_0dRYaAD3kvmA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>Thanks Even</div>
        <div><br>
        </div>
        <div>Unfortunately I do not have any example. I was just reading
          the code of projinfo to see how to get CoordinateOperations in
          C++.</div>
        <div><br>
        </div>
        <div>
          <div>
            <div dir="ltr" class="gmail_signature"
              data-smartmail="gmail_signature">.___ ._ ..._ .. . ._. 
              .___ .. __ . _. . __..  ... .... ._ .__<br>
              Entre dos pensamientos racionales <br>
              hay infinitos pensamientos irracionales.<br>
              <br>
            </div>
          </div>
          <br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Fri, 20 Jan 2023 at 20:15,
          Even Rouault <<a href="mailto:even.rouault@spatialys.com"
            moz-do-not-send="true" class="moz-txt-link-freetext">even.rouault@spatialys.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div>
            <p>Hi Javier,</p>
            <p>which exact projinfo invokation did you use ?</p>
            <p>(I'm not that surprised and remember having already
              seeing that. There are various heuristics and filtering
              that could cause this)</p>
            <p>Even<br>
            </p>
            <div>Le 20/01/2023 à 20:11, Javier Jimenez Shaw a écrit :<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">
                <div>Hi</div>
                <div><br>
                </div>
                <div>Inspecting the code of projinfo, I see a situation
                  that may show the message <br>
                </div>
                <div>"Note: using '--spatial-test intersects' would
                  bring more relevant results".</div>
                <div>Looking at the code, it happens only when using
                  "--spatial-test" option with "intersects" or default
                  ("contains") both return 1 operation... but different.</div>
                <div>How is that possible? I would expect that
                  "intersects" contains all in "contains".<br>
                </div>
                <div><br>
                </div>
                <div>The code involved is this</div>
                <div><br>
                </div>
                <div><span>        list =
                    CoordinateOperationFactory::create()->createOperations(<br>
                                nnSourceCRS, nnTargetCRS, ctxt);<br>
                            if (!spatialCriterionExplicitlySpecified
                    &&<br>
                                spatialCriterion ==
                    CoordinateOperationContext::SpatialCriterion::<br>
                                                       
                    STRICT_CONTAINMENT) {<br>
                                try {<br>
                                    ctxt->setSpatialCriterion(<br>
                                       
                    CoordinateOperationContext::SpatialCriterion::<br>
                                            PARTIAL_INTERSECTION);<br>
                                    auto list2 =<br>
                                       
                    CoordinateOperationFactory::create()->createOperations(<br>
                                            nnSourceCRS, nnTargetCRS,
                    ctxt);<br>
                                   
                    spatialCriterionPartialIntersectionResultCount =
                    list2.size();<br>
                                    if
                    (spatialCriterionPartialIntersectionResultCount == 1
                    &&<br>
                                        list.size() == 1 &&<br>
                                        list2[0]->nameStr() !=
                    list[0]->nameStr()) {<br>
                                       
                    spatialCriterionPartialIntersectionMoreRelevant =
                    true;<br>
                                    }<br>
                                } catch (const std::exception &) {<br>
                                }<br>
                            }</span></div>
                <div><span></span></div>
                <div><span>....</span></div>
                <div><span>        if
                    (spatialCriterionPartialIntersectionMoreRelevant) {<br>
                               std::cout << "Note: using
                    '--spatial-test intersects' would bring "<br>
                                            "more relevant results."<br>
                                         << std::endl;<br>
                           }</span></div>
                <div><br>
                </div>
                <div>Thanks</div>
                <div>Javier<br>
                </div>
                <div>
                  <div dir="ltr">.___ ._ ..._ .. . ._.  .___ .. __ . _.
                    . __..  ... .... ._ .__<br>
                    Entre dos pensamientos racionales <br>
                    hay infinitos pensamientos irracionales.<br>
                    <br>
                  </div>
                </div>
              </div>
              <br>
              <fieldset></fieldset>
              <pre>_______________________________________________
PROJ mailing list
<a href="mailto:PROJ@lists.osgeo.org" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">PROJ@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/proj" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/proj</a>
</pre>
            </blockquote>
            <pre cols="72">-- 
<a href="http://www.spatialys.com" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
          </div>
          _______________________________________________<br>
          PROJ mailing list<br>
          <a href="mailto:PROJ@lists.osgeo.org" target="_blank"
            moz-do-not-send="true" class="moz-txt-link-freetext">PROJ@lists.osgeo.org</a><br>
          <a href="https://lists.osgeo.org/mailman/listinfo/proj"
            rel="noreferrer" target="_blank" moz-do-not-send="true"
            class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/proj</a><br>
        </blockquote>
      </div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </body>
</html>