| 37 | |
| 38 | For those interested in converting calibration data in PicLayer: |
| 39 | INITIAL_SCALE is the initial size of 100 image pixels (length of ruler in JOSM). |
| 40 | SCALEX/Y is the factor after changing the size of the raster image relative to JOSM data layer. |
| 41 | INITIAL_POS_y/X are the coordinates of the image center in mercator projection. |
| 42 | POSITION_X/Y are the coordinates after shifting the raster image relative to JOSM data layer. |
| 43 | ANGLE is the angle in degrees (clockwise -> positive) when the raster image is rotated. |
| 44 | Mercator units are arc units in longitude (PI <-> 180). |
| 45 | Latitude is a bit complicated because this projection preserves angles but not areas: |
| 46 | y = ln(tan(45+b/2)) |
| 47 | where b is in degrees, ln ist the natural logarithm and tan ist the tangent. |
| 48 | The longitude in degrees l is obtained from x via l = x*180/PI. |
| 49 | The latitude b can be calculated from y by b = 2*arctan(e**y) - 45 (when inverse tangent returns degrees). |
| 50 | When transforming longitude degree differences of image corners to distance, you have to take into account that one degree east-west has different size dependent on latitude. |
| 51 | At equator 1 degree -> d0 = 111.3 km, at latitude b you get d = d0/cos(b)(only exact for sphere, but deviation from ellipsoid < 0.5%). |
| 52 | |
| 53 | |
| 54 | |