It seems to me that you'd have to do this to get an accurate
representation:
1. Calculate, for some number of segments, the ellipsoidal distances
around the ellipse given a width and height. In other words, you have
the meters distance along both axis, you need to calculate the meters
distance for the points in-between the axis. You should also keep
track of the azimuth from the center to each one of these points.
2. Use the GreatCircle class to calculate the lat/lon points for all
these azimuth/distance pairs. Keep these, they are the same regardless
of projection.
3. In generate() project the lat/lon points and connect them to make
the internal shape object.
Seems like this deserves it's own subclass, and that the OMPoly is the
best-suited super class.
There's probably a more elegant solution, this is just a brute-force
method.
- Don
On Friday, May 30, 2003, at 01:21 PM, Hamilton, Kimberly D. wrote:
> Hi Chris,
> You could do that, but you'd have to change the pixel widths and
> heights on
> every projection change. That logic would be better handled in the
> OMCircle
> class -- provide a new constructor and figure out the pixel widths and
> heights in the generate() method. We (people at my work) actually
> need this
> functionality too and we'll have to make such a modification -- that
> is, if
> no one else gets to it first.
>
> Kim
>
> -----Original Message-----
> From: Chris Hopkins [mailto:chopkins@cra.com]
> Sent: Friday, May 30, 2003 9:01 AM
> To: 'openmap-users@bbn.com'
> Subject: [OpenMap Users] Lat/Lon ellipses
>
>
>
> Hi all -
>
> I realize that lat/lon ellipses are not supported in the current API
> but has
> anyone hacked them? What I have to specify an ellipse is the lat/lon
> center
> and a distance, in meters, for the minor axis and major axis (as well
> as the
> rotation angle, in radians). I'm having a hard time trying to convert
> this
> information into something supported by the API. I think the easiest
> way
> would be to figure out how many pixels, at the current scale,
> corresponds to
> the distance in meters for both the minor and major axes and then use
> the
>
> public OMCircle(float latPoint,
> float lonPoint,
> int w,
> int h)
>
> constructor.
>
> Has anyone else worked this out?
>
> Thanks,
> Chris
> --
> [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"]
>
>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, BBN Technologies, dietrick@bbn.com
10 Moulton Street, Cambridge, MA 02138
617-873-3031 [fax]-2794
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-- [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 Fri May 30 19:31:54 2003
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:35 EDT