Sunday 25 February 2018

openstreetmap - How do I georeference a ski map?


enter image description here


I have a map of a mountainous landscape, http://skimap.org/data/989/60/1218033025.jpg. It contains a number of known points, the lat-longs of which can be easily found out using google maps. I wish to be able to pin any latitude longitude coordinate on the map, of course within the bounds of the landscape. For this, I tried an approach that seems to be largely failing.


I assumed the map to be equivalent to an aerial photograph of the Swiss landscape, without any info about the altitude or other coordinates of the camera. So, I assumed the plane perpendicular to the camera lens normal to be Ax+By+Cz-d=0. I attempt to find the plane constants, using the known points. I fix my origin at a point, with z=0 at sea level. I take two known points in the landscape, and using the equation for a line in 3d, I find the length of the projection of this line segment joining the two known points, on the plane. I multiply it by another constant K to account for the resizing of this length on a static 2d representation of this 3d image. The length between the two points on a 2d static representation of this image on this screen can be easily found in pixels, and the actual length of the line joining the two points, can be easily found, since I can calculate the distance between the two points with their lat-longs, and their heights above sea level.


I end up with an equation directly relating the distance between the two points on the screen 2d representation, lets call it Ls, and the actual length in the landscape, L. I have many other known points, so plugging them into the equation should give me values of the 4 constants. For this, I needed 8 known points (known parameters being their name, lat-long, and heights above sea level), one being my origin, and the second being a fixed reference point. The remaining 6 points generate a system of 6 linear equations in A^2,B^2,C^2,AB,BC and CA. Solving the system using a online tool, I get the result that the system has a unique solution with all 6 constants being 0. So, it seems that the assumption that the map is equivalent to an aerial photograph taken from an aircraft, is faulty. Can someone please give me some pointers or any other ideas to get this to work? Do open street maps have a Mercator projection?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...