Re: [OpenMap Users] Rotate a OMAreaList

From: Don Dietrick <dietrick_at_bbn.com>
Date: Mon, 03 Aug 2009 09:32:24 -0400

Hi Ruben,

I understand that you're trying to rotate lines and polygons, but my
real question is why? What are you trying to represent with a lat/lon
line or polygon that is rotated, or rather, what meaning are you trying
to convey by rotating a lat/lon poly? Do you think you might have to
find the center point, check the azimuth and distance to each point, and
then modify the azimuth angle to each point? That would produce
different results than rotating the poly in xy space, but it would also
be slower. Do you need a precise location of the rotated poly points?

- Don

Ruben DF wrote:
> Don, thanks for answering.
>
> I used forward method successfully just a few hours after sending my
> previous message (reading the openmap documentation)
>
> However, I continue trying to rotate an OMLine. I can rotate the line
> calling (Graphics2D)g).rotate(angle, x,y) at render method (X and Y
> transformed from Lat/Long by forward method), but, when I zoom or pan
> the map, the line is getting crazy, the line seems to lose the center,
> moving around over the map...I think I must set new lat long postion
> (after rotating) to fix the new position but i dont know how i can
> retrieve the X,Y position from the line after rotating (Graphics2D
> does not have any method to get the coordinates...) in order to
> translate to lat/long positions later...
>
> Don, I need to rotate polygons, lines...etc giving an azimuth input...
>
> Thanks in advance
>
> --- El *vie, 31/7/09, Don Dietrick /<dietrick_at_bbn.com>/* escribió:
>
>
> De: Don Dietrick <dietrick_at_bbn.com>
> Asunto: Re: [OpenMap Users] Rotate a OMAreaList
> Para: "Ruben DF" <rdocasalf_at_yahoo.es>
> Fecha: viernes, 31 julio, 2009 6:14
>
> Hi Ruben,
>
> The Projection object translates between lat/lon and x/y, using
> the forward() methods.
>
> Of you rotate a lat/lon line, though, you are basically killing
> the geospatial meaning of the line. What are you trying to display?
>
> - Don
>
>
> On Jul 22, 2009, at 6:17 AM, Ruben DF wrote:
>
> > Hi,
> >
> > I have a shape defined by an OMAreaList. How could i rotate that
> shape fixing a specific point? I have started to rotate a simple
> OMLine adding at render(g) method the code line:
> >
> > ((Graphics2D)g.rotate(angle,x,y)
> >
> > I suppose that x and y are the center coordinates of the
> rotation. Since i have latitude and longitude points, how can i
> translate those points in X and Y points?
> >
> > Thanks a lot
> > Regards
> >
>
>

--
[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 Mon Aug 03 2009 - 09:32:41 EDT

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