Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Map Rotation

Hi Jesse,

Thanks for the reply. 

According to your suggestion  i rotated the graphics in renderer
(BasicFeatureRenderer).
Also taken care of pixelToWorld() and worldToPixel() methods.

Thus now i am able to rotate the map.
But the problem is of bounds. I am unable to set the bounds for the
viewport.

Thus i can see the rotated image on the viewport but as i pan towards the
edges of the viewport the some part of the map is cutting down. I think this
is only because of the invalid bounds.

Please give me some idea about how to set the rotated image bounds to
viewport bounds ?





Jesse Eichar-4 wrote:
> 
> I think it depends on how you want the functionality to work.  There are
> map
> transformation commands that you can send to the map that can rotate the
> map.  I think that perhaps the transformation is reset after a pan or zoom
> though, I cannot remember that anymore for certain.
> 
> The main component for displaying the map is the ViewportPane.  But that
> is
> only for the main screen not for printing and overviews.  You can use draw
> commands to rotate the viewport pane if you like.  But if you want to make
> the rotation at a deeper level like at the renderer level then it is
> slightly more difficult.  I think each renderer handles translation from
> world to map coordinates individually. For example WMSRenderer lets the
> WMS
> handle it and the BasicFeatureRenderer uses
> ViewportModel.getAffineTransform.
> 
> So each of these would probably need to be modified.  The good news is
> that
> the modification would be minor for each.
> 
> Each renderer has a render(Graphic2D g) method.  You could modify each so
> set a transform on the graphics 2d.
> 
> Jesse
> 
> On Mon, Mar 29, 2010 at 7:38 AM, Trupti Pol <ktrup7@xxxxxxxxx> wrote:
> 
>>
>> Hi ,
>>
>> We need to rotate map in one of product which uses udig - M7 as the
>> target
>> Platform
>> I have alreay gone thru the previous post dtd somewhere in 2008.
>> I just wanted to know is there any provision in udig M7 currently to
>> rotate
>> the Map.
>>
>> What will the amount of efforts required?
>> Will it be difficult one or not possible at all?
>>
>> I would also like to know the areas which will have direct impact of this
>> functionality.
>>
>> Looking for some positive response.
>> Thanks in advance.
>>
>> Trupti Pol.
>>
>> -----
>> Thanks & Regards,
>> Trupti Pol
>> --
>> View this message in context:
>> http://old.nabble.com/Map-Rotation-tp28064993p28064993.html
>> Sent from the udig-devel mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> User-friendly Desktop Internet GIS (uDig)
>> http://udig.refractions.net
>> http://lists.refractions.net/mailman/listinfo/udig-devel
>>
> 
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
> 
> 


-----
Thanks & Regards,
Trupti Pol
-- 
View this message in context: http://old.nabble.com/Map-Rotation-tp28064993p28174161.html
Sent from the udig-devel mailing list archive at Nabble.com.



Back to the top