The app I'm working on requires that we show the "horizon" associated with what an object (say a satellite) in space can see, based on its altitude and FOV. I typically can render this with no problem, except when the horizon circle contains the north pole, then all sorts of weirdness can happen. Here is an example:
On both the sceneview, the black outline correctly denotes what I expect to see, but the polygon doesn't fill correctly.
On the mapview, I expect to see something that looks like a sine wave filled in from the top.
In neither case did I get what I expected.
I've attached the code that generates this image. Run it and click the "Large Circle Issue" button.
There is still some investigation to do, but I have observed that executing a GeometryEngine.DensifyGeodetic operation (or BufferGeodetic with 0 distance) on the geometry ("poly") helps it display as you expect in 2D. The 3D issue displaying geometries over the poles we already have logged as a bug.
I tried both the DensityGeodetic and BufferGeodetic and neither helped resolve my issue in either 2D or 3D. Perhaps you could tell me where and what I should change in my code.
Also, this leads to the next problem, which I suspect may be a different symptom of the same issue.
Placing a small circle directly on the antimeridian (at 180 or -180 lon) creates the following picture:
And, even worse, when I try to draw a donut (a circle with a circle subtracted from it), I get this:
I will update the attached App. The first picture above relates to the "Small Circle Issue" button and the second to "Small Circles Issue".
Unfortunately, I was unable to replace the original attachment or add a new one.
So, I put the code out on GitHub here: GitHub - dhope1106/ArcGISRuntimeIssues: Issues as I reported them to the ArcGIS folks
I will be adding new issues as I find them.
We had the same issue with a line. we solved it by making a multipart polyline - the two lines terminated on the dateline. It would not be easy but you might be able to split your polygon into a multi-part polygon that used the edge of the date line as your boundary for each.
Thanks for the reply. I have considered that approach, and in one case implemented it as you suggest. However, I'd like ESRI to take a look at it and see if they can fix it before I continue pushing a workaround.
Thanks for the updated repro. We have been investigating this: I need to try out a couple of remaining things and summarize the results of the investigation. I'll update this thread as soon as I have done that.
There are rendering issues in the SceneView with polygons that span the pole and we have a bug logged to address these. Using BufferGeodetic or EllipseGeodetic should give you the desired result for the geometry. In terms of a workaround to improve the rendering (until the rendering issues are addressed), you can set the GraphicsOverlay.RenderingMode property to RenderingMode.Static, and set a null outline on the fill symbol. That should have it looking like the example below.