RE: Ellipses

From: Oscarson Erik <eoscarson@rayva.org>
Date: Thu Sep 26 2002 - 14:05:11 EDT

Hi Jamie,

I'm not sure this will help. Does whatever calls this method keep track
of the georeferenced points and then call projection.forward(...) to get
the appropriate Height & Width?

This uses the same constructor that I mentioned. The width & height are
X/Y window coordinates, so the ellipse is always the same size
regardless of map scale or projection, unless the width & height that
are passed in have been 'generated' in some way.

If you want to see some real OpenMap 'magic,' create a LatLon OMCircle
using straight lines and then use the gestures mode to drag it around
the map window that uses CADRG-projection. The circle projects
correctly in real-time. If you were able to try the same thing with an
ellipse, the size/shape wouldn't change, no matter where it was moved
to.

Erik

-----Original Message-----
From: Jamie Oldham [mailto:joldham@modusoperandi.com]
Sent: Thursday, September 26, 2002 12:40 PM
Subject: Re: Ellipses

Hey,

I currently use the following code to create ellipses using OpenMap, it
works great!

/**
     * Create the ellipse
     * @return OMCircle
     * The fix ellipse
     */
    public OMCircle createCircle(float centerLat, float centerLon,
      int width, int height, double angle, Color color) {
        OMCircle circle = new OMCircle(centerLat, centerLon,
          width, height);
        circle.setRotationAngle(angle);
        circle.setLinePaint(color);
 return circle;
    }

jamie oldham

----- Original Message -----
From: "Pearson John T Jr GG-13 453 EWS/EWR"
<John.Pearson@LACKLAND.AF.MIL>
To: "'Oscarson Erik'" <eoscarson@rayva.org>; <openmap-users@bbn.com>
Sent: Thursday, September 26, 2002 11:42 AM
Subject: RE: Ellipses

Classification: UNCLASSIFIED

On Thursday, September 26, 2002 10:14 AM, Erik Oscarson wrote

>There is a good possibility that I've missed something that already
exists
within the API.

Perhaps someone else has developed what you need, and would be willing
to
share it with all of us OpenMap users/developers.

Regards

John pearson

-----Original Message-----
From: Oscarson Erik [mailto:eoscarson@rayva.org]
Sent: Thursday, September 26, 2002 10:14 AM
To: openmap-users@bbn.com
Subject: Ellipses

Hi All,

I'm trying to use OMCircle to create ellipses that have major and minor
axes
that use Length, like the
OMCircle constructor [OMCircle(float latPoint, float lonPoint, float
radius,
Length units)] uses for radius.

I'm not sure if this is a good approach or not, but I am planning on
extending the OMCircle class (OMEllispe maybe?) and setting something up
that would simply derive the H/W from the projection during generation
and
then use that to rebuild itself as necessary. This approach is
geographically unsound, but at smaller zoom levels it might work well
enough.

I do not have knowledge of the math necessary to do this correctly, but
I'm
still going to play around with it.

There is a good possibility that I've missed something that already
exists
within the API.

Erik Oscarson
Raytheon
eoscarson@rayva.org

--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe
openmap-users"]
Classification: UNCLASSIFIED
--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe
openmap-users"]
--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Thu Sep 26 14:06:04 2002

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:33 EDT