Jürgen Jacob ha scritto: > Dear list, > I'm currently developing an application based on uDig and GeoTools and I > have this problem: > I'm using WGS_84 as default CRS and I'm interested in the area of > polygons created by the user. Polygon.getArea() returns something but it > seems to be in square degree since the dimension of the crs is degree. > Even square degree is a very cool dimension, I can't use it. In > GeodeticCalculator I found getOrthodromicDistance but I don't know how > to develop something like getOrthodromicArea that returns the area in > squarekilometers. > Is something like this already implemented?
Not that I know of. Usually the algorithm used on the cartesian space uses trapezoids decomposition (http://www.problemonline.com/tt1/pick/polygon.html). On the geographic coordinates it's possible to build a similar one that uses the area built connecting the current segment with one of the poles, hmmm.... yeah, took me some time to find it again, but here is, courtesy of NASA: http://trs-new.jpl.nasa.gov/dspace/bitstream/2014/40409/1/07-03.pdf (also with nice presentation here: http://www.ucl.ac.uk/~ucessan/news/bob-aag2007.ppt) Unfortunately this one works on a sphere, not an ellipsoid, not sure how big the error would be. This paper proposes a different approach that works on an ellipsoid, thought again we're talking about approximations: http://www.geodyssey.com/papers/ggelare.html If you can build anything out of this, I believe it would be a nice contribution to GeoTools Cheers -- Andrea Aime OpenGeo - http://opengeo.org Expert service straight from the developers. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel