Thanks for the help Martin and Johann<br>Here is what i did, can you confirm that the thinking is correct?<br><br>AffineTransform objectiveToDisplay = (AffineTransform) mapWidget.getCanvas().getObjectiveToDisplayTransform();<br>
 //Amount of inches in one meter<br>double inchesInOneMeter = 39.3700787<br>//physical size of pixel on screen<br>double pixelPhysicalSize = (1/72.0) ;<br>//physical size of screen pixel in meter<br>double physicalSizeInMeter = pixelPhysicalSize / inchesInOneMeter;<br>
//The current scale of the projected map<br>double currentScale = XAffineTransform.getScale(objectiveToDisplay);<br>//The size of one pixel on the map in meter<br> double onePixelInMeter = 1/currentScale ;<br> //The map scale <br>
double MapScale = onePixelInMeter / physicalSizeInMeter ;<br><br>Result is then 1:MapScale<br><br>This way the you compare one screen pixel size in meter to one pixel size on the map.<br><br>Do you guys agree?<br><br><br>
<br><br><div class="gmail_quote">On Mon, Sep 7, 2009 at 12:18 PM, Martin Desruisseaux <span dir="ltr">&lt;<a href="mailto:martin.desruisseaux@geomatys.fr">martin.desruisseaux@geomatys.fr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Theuns Heydenrych a écrit :<div class="im"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
What exactly does this number mean, is it the size of a pixel representing one meter?<br>
</blockquote>
<br></div>
It is the amount of pixels in one metres. The inverse (23560) is the &quot;real world&quot; size in metres of one pixel.<br>
<br>
In order to compute a map scale, you need to know the physical size of one pixel on your screen device. There is some API in Java2D that are supposed to give you this information, but it seems to often fallback on 1/72 of inch as a default value.<br>

<br>
If &quot;ps&quot; is the physical size in metre of one pixel on your screen, then<br>
<br>
  scale(objectiveToDisplay) * ps<br>
<br>
should give you the map scale.<br><font color="#888888">
<br>
        Martin<br>
</font></blockquote></div><br>