-
Notifications
You must be signed in to change notification settings - Fork 557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wrong sum in Survey Area #764
Comments
@wolkstein That's great. Do you want to submit this as a pull request via git/github? That way your name will be logged into the history of the project. Also if you could send me a set of coordinates, and the area contained in them I can write a unit test to make sure that this function will always return the correct value. Especialy if someone changes it in the future. |
hey, |
@wolkstein Give me a set of coordinates, and the area contained in those and I can write a test to help in the development. |
ok, i will crate a test polygon with reference coordinates and area. i noticed that a soccer field is not so good because simple geometry. i think i will create something like a irregular pentagram. |
hi,
Hopefully i do a right calculation the surface area is 502915m² |
@wolkstein I added the test case in #770. You can run if you checkout the https://github.com/arthurbenemann/droidplanner/tree/issue764 branch, and in eclipse select the CORE project and click "Run as Junit test". Here is the test file if you want to check: With the code that you provided the result is: With the old code (current master): |
hi,
i noticed a wrong result in calculated Area in m² if you create a Survey Polygon.
maybe this change in will fix getArea() in GeoTools. i am not sure if each polygon will calculated right. but some tests here produce good results. i use a known soccer field (FIFA-Norm105,00m x68,00m = 7.140,00 m²) to test the m² results.
new getArea() using simple Shoelace formula 2A = n SUM i=1(yi+ yi+1)(xi-xi+1). i use relative x and y values to reduce cpu load and prevent double overflow.
/g
wolke
The text was updated successfully, but these errors were encountered: