<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>I can't replicate that. Below the output with the Python bindings
that directly map <span lang="EN-US">OGR_G_ApproximateArcAngles():</span></p>
<p><span lang="EN-US">>>> from osgeo import ogr<br>
>>> g = ogr.ApproximateArcAngles(0, 0, 0, 1, 1, 0, 0,
-90, 0)<br>
>>> g.FlattenTo2D()<br>
>>> g.ExportToWkt()<br>
'LINESTRING (1 0,0.997668769190539
0.068242413364671,0.990685946036331
0.136166649096247,0.979084087682323
0.203456013052634,0.962917287347799
0.269796771157024,0.942260922118821
0.334879612170986,0.917211301505453
0.398401089846241,0.887885218402375
0.460065037731152,0.854419404546489
0.519583950035434,0.816969893010442
0.576680322114867,0.77571129070442
0.631087944326053,0.730835964278124
0.682553143218654,0.682553143218654
0.730835964278124,0.631087944326053
0.77571129070442,0.576680322114867
0.816969893010442,0.519583950035434
0.854419404546489,0.460065037731152
0.887885218402375,0.398401089846242
0.917211301505453,0.334879612170986
0.942260922118821,0.269796771157024
0.962917287347799,0.203456013052634
0.979084087682323,0.136166649096247
0.990685946036331,0.068242413364671 0.997668769190539,0.0 1.0)'</span></p>
<p><span lang="EN-US">>>> g = ogr.ApproximateArcAngles(0,
0, 0, 1, 1, 0, 0, -90, 10)<br>
>>> g.FlattenTo2D()<br>
>>> g.ExportToWkt()<br>
'LINESTRING (1 0,0.984807753012208
0.17364817766693,0.939692620785908
0.342020143325669,0.866025403784439 0.5,0.766044443118978
0.642787609686539,0.642787609686539 0.766044443118978,0.5
0.866025403784439,0.342020143325669
0.939692620785908,0.17364817766693 0.984807753012208,0.0 1.0)'<br>
>>> <br>
</span></p>
<p><span lang="EN-US">For the inc=0 case, note that there's a x/y
inversion compared to your output.</span></p>
<p><span lang="EN-US">The inc=10 case has 10 points in its output as
expected<br>
</span></p>
<p><span lang="EN-US">Even<br>
</span></p>
<div class="moz-cite-prefix">Le 16/06/2022 à 18:27, Joaquim Manuel
Freire Luís a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:AM6PR04MB395976932C7314C844D92463A6AC9@AM6PR04MB3959.eurprd04.prod.outlook.com">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Even, I wrapped
OGR_G_ApproximateArcAngles() in Julia and I think there is
something wrong with the dfMaxAngleStepSizeDegrees argument</span></p>
<p class="MsoNormal"><span lang="EN-US">(here shortcut to ‘inc’)</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">This is fine (just
repeating the default 0.0 value). Note, I’m dropping the z
(=0) argin but that’s only the julia wrapper interface.</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="FR">D = GMT.Gdal.arcellipse(0,
0, 1., 1., 0., -90., inc=0.)</span></p>
<p class="MsoNormal"><span lang="FR">BoundingBox:
[6.123233995736766e-17, 1.0, 0.0, 1.0]</span></p>
<p class="MsoNormal"><span lang="FR">24×2 GMTdataset{Float64, 2}</span></p>
<p class="MsoNormal"><span lang="FR">Row │ x y</span></p>
<p class="MsoNormal"><span lang="FR"> </span><span
lang="EN-US">│ Float64 Float64</span></p>
<p class="MsoNormal"><span lang="EN-US">─────</span><span
lang="EN-US">┼</span><span lang="EN-US">────────────────────────</span><span
lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US"> 1 │ 6.12323e-17 1.0</span></p>
<p class="MsoNormal"><span lang="EN-US"> 2 │ 0.0682424
0.997669</span></p>
<p class="MsoNormal"><span lang="EN-US"> 3 │ 0.136167
0.990686</span></p>
<p class="MsoNormal"><span lang="EN-US"> 4 │ 0.203456
0.979084</span></p>
<p class="MsoNormal"><span lang="EN-US"> 5 │ 0.269797
0.962917</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span><span
lang="EN-US">⋮</span><span lang="EN-US">
</span><span lang="EN-US">│</span><span lang="EN-US"> </span><span
lang="EN-US">⋮</span><span lang="EN-US">
</span><span lang="EN-US">⋮</span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US"> 20 │ 0.962917
0.269797</span></p>
<p class="MsoNormal"><span lang="EN-US"> 21 │ 0.979084
0.203456</span></p>
<p class="MsoNormal"><span lang="EN-US"> 22 │ 0.990686
0.136167</span></p>
<p class="MsoNormal"><span lang="EN-US"> 23 │ 0.997669
0.0682424</span></p>
<p class="MsoNormal"><span lang="EN-US"> 24 │ 1.0 0.0</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">But if I use for example
10 (or any other number) the dfEndAngle is no longer
respected</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="FR">D = GMT.Gdal.arcellipse(0,
0., 1., 1., 0., -90., inc=10.)</span></p>
<p class="MsoNormal"><span lang="FR">BoundingBox:
[6.123233995736766e-17, 0.9993908270190958,
-0.17364817766693033, 1.0]</span></p>
<p class="MsoNormal"><span lang="FR">26×2 GMTdataset{Float64, 2}</span></p>
<p class="MsoNormal"><span lang="FR">Row │ x y</span></p>
<p class="MsoNormal"><span lang="FR"> </span><span
lang="EN-US">│ Float64 Float64</span></p>
<p class="MsoNormal"><span lang="EN-US">─────</span><span
lang="EN-US">┼</span><span lang="EN-US">─────────────────────────</span><span
lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US"> 1 │ 6.12323e-17 1.0</span></p>
<p class="MsoNormal"><span lang="EN-US"> 2 │ 0.0697565
0.997564</span></p>
<p class="MsoNormal"><span lang="EN-US"> 3 │ 0.139173
0.990268</span></p>
<p class="MsoNormal"><span lang="EN-US"> 4 │ 0.207912
0.978148</span></p>
<p class="MsoNormal"><span lang="EN-US"> 5 │ 0.275637
0.961262</span></p>
<p class="MsoNormal"><span lang="EN-US"> 6 │ 0.34202
0.939693</span></p>
<p class="MsoNormal"><span lang="EN-US"> 7 │ 0.406737
0.913545</span></p>
<p class="MsoNormal"><span lang="EN-US"> 8 │ 0.469472
0.882948</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span><span
lang="EN-US">⋮</span><span lang="EN-US">
</span><span lang="EN-US">│</span><span lang="EN-US"> </span><span
lang="EN-US">⋮</span><span lang="EN-US">
</span><span lang="EN-US">⋮</span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US"> 19 │ 0.951057
0.309017</span></p>
<p class="MsoNormal"><span lang="EN-US"> 20 │ 0.970296
0.241922</span></p>
<p class="MsoNormal"><span lang="EN-US"> 21 │ 0.984808
0.173648</span></p>
<p class="MsoNormal"><span lang="EN-US"> 22 │ 0.994522
0.104528</span></p>
<p class="MsoNormal"><span lang="EN-US"> 23 │ 0.999391
0.0348995</span></p>
<p class="MsoNormal"><span lang="EN-US"> 24 │ 0.999391
-0.0348995</span></p>
<p class="MsoNormal"><span lang="EN-US"> 25 │ 0.994522
-0.104528</span></p>
<p class="MsoNormal"><span lang="EN-US"> 26 │ 0.984808
-0.173648</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">Joaquim</span></p>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</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>