Re: [OpenMap Users] ArcCalc to LatLonPoint

From: Don Dietrick <dfdietrick_at_gmail.com>
Date: Thu, 21 Apr 2011 14:30:08 -0400

For the first part, you might want to also look at OMDecoratedSpline,
and create a ShapeDecorator that represents the little arc. There are
a bunch of decorators for meteorological lines, as an example, in the
com.bbn.openmap.omGraphics.meteo package. But if what you have works
for you, cool.

For OMPolys, the lat/lon array gets modified in place to radians. The
javadocs warn about this. :) If you want to mess with them, you need
to work in radians or use the ProjMath methods for moving arrays to
rads or degrees. If you need the OMPoly to render while you are
working on it and you want to work with degrees, it's better to make a
copy of the array to modify before converting it to degrees, and then
setting it back on the OMPoly. When you put it back, make sure you
tell the OMPoly if they are radians or degrees, so it knows to convert
them to rads if it needs to.

- Don

On Thu, Apr 21, 2011 at 2:04 PM, Master Zonk <zonkix_at_gmail.com> wrote:
>
> Yeah....sorry about that.  I kinda figured that out after messing with it a
> bit.  I am trying to draw a Forward Line Of Own Troops (FLOT) which is in
> the most basic terms, a "hilly" line.  I think I have it figured out ...I am
> drawing a series of evenly spaced 180 degree Arcs along the line...seems to
> work fairly well....
>
> On a side note....not sure what I am seeing but it appears that if I use a
> float array containing lat/lon and I use it to build a OMPoly and then try
> to use the same array immediately after, the contents of the array are
> useless....ever heard of anything like that?.....
>
> Thanks for the help as usual...you the man!
>
>
> Don Dietrick-2 wrote:
>>
>> The x and y arrays should match up.  They are not lat/lons, they are
>> pixel locations on the map.  If you want to convert them to lat/lons,
>> you should use the projection.inverse() method on each lat/lon pair.
>>
>> But just so you know, the ArcCalc creates meaningless arcs - they
>> don't really mean anything spatially.  They were created to allow a
>> layer to create non-overlapping paths between two points, when two
>> points are connected in some way and you want to show there is more
>> than one link between them.
>>
>> What are you trying to represent?
>>
>> - Don
>>
>> On Wed, Apr 20, 2011 at 2:03 PM, Master Zonk <zonkix_at_gmail.com> wrote:
>>>
>>> Is there or does anybody have a way to have the ArcCalc return
>>> LatLonPoint. I
>>> can get the x/y return but I cannot seem to match up the x to the
>>> corresponding y for some reason and I get some really of the chart
>>> LatLons.....can somebody tell me how those arrays are arranged ...does
>>> the x
>>> index match the y index or am I way off as usual?
>>>
>>>
>>> Thanks for any help!
>>> --
>>> View this message in context:
>>> http://old.nabble.com/ArcCalc-to-LatLonPoint-tp31443509p31443509.html
>>> Sent from the OpenMap mailing list archive at Nabble.com.
>>>
>>> --
>>> [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"]
>>>
>>
>> --
>> [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"]
>>
>>
>
> --
> View this message in context: http://old.nabble.com/ArcCalc-to-LatLonPoint-tp31443509p31451528.html
> Sent from the OpenMap mailing list archive at Nabble.com.
>
> --
> [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"]
>

--
[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 Thu Apr 21 2011 - 14:31:53 EDT

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