# Re: [OpenMap Users] outlining an image, reprojecting onto map

From: Ken Anderson <kanderson_at_bbn.com>
Date: Mon, 20 Sep 2004 10:34:42 -0400

Here's what i would do.

Find points, p, on the picture that you can determine latitude and longitude for, ll.
Project the ll points into mercator, say to get a rectangular coordinates for the points, r.

You need at least 3 points. I'd measure more.

You then want to determine the 6 elements of the affine transform that converts
a p point to its r coordinates:
r p
[ x'] [ m00 m01 m02 ] [ x ] [ m00x + m01y + m02 ]
[ y'] = [ m10 m11 m12 ] [ y ] = [ m10x + m11y + m12 ]
[ 1 ] [ 0 0 1 ] [ 1 ] [ 1 ]

Each pi, ri pair provides 2 equations.

[pxim00 + pyi*m01y + 1*m02] = rxi (1)
[pxi*m10 + pyi*m11 + 1*m12] = ryi (2)

Use these to form 2 matrix equations of the form
Am=r
The first from (1) and the second from (2).

You can then solve these equations for the m's.
I'd have more than three points, and use least squares.

Now you have transformed the p's into r's you can inverse mercator project the r's into lat,lons.

k

At 04:09 PM 9/19/2004 -0400, Geoffrey Knauth wrote:
>We had major flooding in PA yesterday, as has much of the East Coast.
>In this picture:
>
>http://knauth.org/gsk/flood-040918/images/14.html
>
>I want to mark some points on photos like the one above, draw some outlines of flood limits, and then reproject the graphics onto maps. I know the math exists, I just don't know how hard it is.
>
>County officials are trying hard to understand the limits of yesterday's event, to improve flood mitigation plans. I'm just looking for ideas.
>
>Geoffrey
>--
>Geoffrey S. Knauth | http://knauth.org/gsk
>
>--
>[To unsubscribe to this list send an email to "majdart_at_bbn.com"
>with the following text in the BODY of the message "unsubscribe openmap-users"]

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Mon Sep 20 2004 - 10:35:29 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:06 EDT