[OpenMap Users] geo - area

From: Robert Najlis <rnajlis_at_cs.indiana.edu>
Date: Wed, 29 Sep 2004 00:54:51 -0400


I am trying to get the area from an OMPoly using the Geo#Area function.
  I am getting negative numbers for the area. Has anyone used this
function before? I am creating the geos for the enumeration to pass to
the function as follows:

    Vector geos = new Vector();
             float[] latlons = ((OMPoly) omGraphic).getLatLonArray();

             for (int i = 0; i < latlons.length; i += 2) {
                 Geo g = new Geo((double)latlons[i],
             System.out.println("getArea: num Geos: " + geos.size());
             Enumeration e = geos.elements();
             return Geo.area(e);

does this make sense? Could there be a problem with the fact that the
getLatLonArray() function that I use to get the lat and lons of each
point use Radians? Looking at the website that was referenced, Radians
seemed to make sense.

Thanks for the help.

- Robert

[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Wed Sep 29 2004 - 01:00:02 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:06 EDT