tags:

views:

58

answers:

2

Hi guys,

I'm currently working on a C# application. What I would like to do is display a map of the UK, just a JPEG image (if possible), which also, when clicked, generates geographic coordinates of the point clicked.

Ideally what I would like to move onto is displaying a marker at two points clicked with a line drawn between them but the above is my primary goal.

My issue is that I'm actually not too sure how I would go about doing this; I have done a fair bit of research into it and have since used XAML to display the JPEG, but very much unsure of what route I should now go down.

I would greatly appreciate any advice you might be able to give.

Thanks,

M

+1  A: 

Besides the scale etc. you will also need to know what Geographic coordinate system the images was created in so that you can correctly interpolate the location from the mouse position on the image and known reference points on the image.

The coordinate system flattens out the map to a 2D image, but this causes distortions which need to be taken into account. This might be an interesting read for you: A guide to coordinate systems in Great Britain

Chris Taylor
A: 

The UK is quite simple because pretty much every map uses the National Grid (defined by the Ordnance Survey). This is rectangular so you don't have to worry about curvature. If you know the national grid and pixel locations of two points on the map you can derive anywhere else using linear interpolation.

arx