Hello!
What I'm doing that I selecting a polygon, then with IdentifyTask I got an arrayOfPolygons with which mainPolygon has any intersection. Next step, I'm making geometryService.intersect(arrayOfPolygons[0] , mainPolygon). When I got an intersection I'm launching geometryService.areasAndLengths for it. After I launch geometryService.intersect(arrayOfPolygons[1] , mainPolygon) and so on. Till the last of arrayOfPolygons. So, in the end I got an array of areas of polygons that intersected with mainPolygon. And if you add this areas one to another you got as result area of mainPolygon.
This worked almost perfect for me. I tested many polygons and got expected results. But(!) one day I found a polygon, I launched an IdentifyTask, then, after completing geometryService.intersect and geometryService.areasAndLengths, I got a problem: area of one polygon contained by mainPolygon is too much bigger than area of mainPolygon.
If you take a look at image added to my post you can see that mainPolygon contains 3 polygons. After geometryService.areasAndLengths I got areas of these polygons. And area of second and third polygons are right. But area of first polygon (blue color) is more then area of mainPolygon. For example, area of mainPolygon is 14, area of second polygon is 2, area of third polygon is 3, and area of first polygon must be 9. But I got 16.
I don't know, maybe problem is how it building a polygon after geometryService.intersect. Because first polygon is complicated polygon, with "hole" in it.
[ATTACH=CONFIG]18239[/ATTACH]
Thanks in advance.