lunedì 14 luglio 2014

Calculate the mapping between PIXELS and MM in a outline rendering

The problem was:
In qgis the outline was rendered with a 0.26 mm outline.

How much it is in pixels ?

The formulaes are these:

1 meters = 39.37007 inch

1 mm = 39.37007 / 1000 = 0.03937007 inch

0.26 mm = ( 39.37007 / 1000 ) * 0.26mm (the outline)  = 0.01023

If the monitor is at 72dpi:
 72dpi => 0.01023 x 72 = 0.73 pixel width

If the monitor is at 91dpi:
91dpi => 0.01023 x 91 = 0.93 pixel width

Thats all.