From: Jody Garnett <jody.garnett@xxxxxxxxx>
To: User-friendly Desktop Internet GIS
<udig-devel@xxxxxxxxxxxxxxxxxxxxx>
Sent: Wed, July 28, 2010 4:00:53 PM
Subject: Re: [udig-devel] problem with right-to-left languages
It is a very interesting problem; uDig is responsible for providing the affine transform used to map clicks to map coordinates. It sounds like we need to test something (the orientation?) and produce a different affine transformation in this case?
So that code should be in ViewportModelImple I guess ... let me have a look.
The method is:
public Coordinate pixelToWorld( int x, int y ) {
if (!validState())
return null;
return ScaleUtils.pixelToWorld(x, y, getBounds(), getRenderManagerInternal()
.getMapDisplay().getDisplaySize());
}
The MapDisplay object is responsible for knowing about the size of the display; and anything else I guess.
So here is what I would suggest you put into a patch for Jesse to review.
- a method for MapDisplay that returns the screen "orientation"
- an additional "flip" flag for the ScaleUtils.pixelToWorld method
- add a method ScaleUtils.pixelToWorld( x, y, bounds, size, orientation )
Jody
On 27/07/2010, at 4:50 PM, Farzad Mahdikhani wrote:
Thanks for the quick response
Jesse.
It is urgent for me and I need a workaround to this. Is it possible to, for example, not make the map editor right-to-left and let it be in its default alignment? If it would be OK, how should I do that?
Any other workarounds?
From: Jesse Eichar <jesse.eichar@xxxxxxxxxxxxxx>
To: User-friendly Desktop Internet GIS <udig-devel@xxxxxxxxxxxxxxxxxxxxx>
Sent: Mon, July 26, 2010 11:40:19 PM
Subject: Re: [udig-devel] problem with right-to-left languages
Wow amazing. I think we might use a formatting class to construct the coordinates and as a result are affected by the locale. Although I would never have predicted this. I wish I could give a better answer but I never expected such behaviour.
On Mon, Jul 26, 2010 at 8:34 PM, Farzad Mahdikhani
<farzad_itm@xxxxxxxxx> wrote:
I executed uDig using a right-to-left language (I used the option -nl fa - fa for Persian language) and there is a big problem. I loaded a shapefile (usa_counties.shp) and tried to use "select feature" tool but it seems that coordinates are right-to-lefted too! The position box below the Map Editor shows the wrong position (mirrored position). When you click at the right side of the map editor, a feature in the left side get highlighted and selected! What is the matter?
Any help would be
appreciated
Ferez
_______________________________________________
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.nethttp://lists.refractions.net/mailman/listinfo/udig-devel