Re: [OpenMap Users] Rotate a OMAreaList

From: Ruben DF <>
Date: Mon, 3 Aug 2009 13:14:18 +0000 (GMT)

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 <> escribió:

De: Don Dietrick <>
Asunto: Re: [OpenMap Users] Rotate a OMAreaList
Para: "Ruben DF" <>
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 ""
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Mon Aug 03 2009 - 09:15:27 EDT

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