<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<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 class="moz-cite-prefix">Le 20/01/2023 à 20:11, Javier Jimenez
Shaw a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CADRrdKtBTPgxnJFg7-VFOzrRUM0CwVmNUp-wDQewJWncTnjtXA@mail.gmail.com">
<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" class="gmail_signature"
data-smartmail="gmail_signature">.___ ._ ..._ .. . ._. .___
.. __ . _. . __.. ... .... ._ .__<br>
Entre dos pensamientos racionales <br>
hay infinitos pensamientos irracionales.<br>
<br>
</div>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
PROJ mailing list
<a class="moz-txt-link-abbreviated" href="mailto:PROJ@lists.osgeo.org">PROJ@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/proj">https://lists.osgeo.org/mailman/listinfo/proj</a>
</pre>
</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>