|12-01-2011, 06:48 PM||#12|
Join Date: Jul 2011
On a sphere ...
The thing about L'Huiller's that started us on this path is that if you take a complicated shape like the tree shape described, on a small scale, and move that fixed shape about a spherical Earth, recalculating the area, L'Huiller's will give you a different answer. For example, if it's placed up at about 45N, it does okay. Move it to the Equator, and it gives a different answer.
We of course very carefully checked that our rotation of the points was correct. The rotation is done by first calculating unit vector positions for all the points in the tree shape, applying the same rotation matrix to them (done in R using the standard long precision), carefully renormalizing before and after. Moreover, the other algorithms, like a unit vector area algorithm we have, and the NASA JPL one, do give the same area for the tree at the Equator as they give up at 45N, and they agree with each other.
Alas, these algorithms also fail on the clever test case which the people at Mathworks cooked up for their areaint function in MATLAB. So, workin' on this ....
If there's interest, I can take on publishing a code for doing this here, in ANSI C, but I have a commitment to first do this and deliver it for within B. This is almost entirely on my own time, so I can't promise a schedule.
The Green's theorem technique I'm looking at would generalize to WGS-84, although that's not what I'm aiming for right now, and whatever code I might offer will only work for a sphere. Also, the radius of said sphere will be a parameter (since there are several ones used for spherical approximations of Earth), although it will default to something sensible.
Thanks for your question.
|12-01-2011, 07:49 PM||#13|
Join Date: Nov 2006
Location: Mojave & Oxnard California
I am mostly concerned with geodesic distance and angles.
Have been using the Vincenty Formula/s using C++.
Was recently informed of the accuracy limitations by a mathematician who has done formulas at greater accuracy, more than I need.
I like to tinker with numbers.
|02-13-2012, 02:01 AM||#14|
Join Date: Mar 2009
I have made a c++ program to make icon and line/polygon feature layer.xml files. I have been using the haversine formula to calculate the distances around a point as above, distance between two points, bearing between two points, position along a route, etc. It is quite useful! I also used trig functions for the altitude and radius.
Last edited by danzig70; 02-13-2012 at 02:08 AM.
|Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)|
|Thread||Thread Starter||Forum||Replies||Last Post|
|WWJ SDK Alpha 4.1 - 0.4.1 available||tag||WWJ Release Announcements||56||11-14-2009 12:51 PM|
|How to calculate area of an irregular polygon by 3D coordinates?||Jason_Steven||Developers' Corner||9||11-13-2008 07:11 AM|
|add Urban Area mode as an icon on the toolbar!||Phil T||Add-ons & Scripts||10||02-25-2005 04:48 PM|