Initial guidance needed on mapping longitude and latitude to the x,y coordinates of an image.

P

Penn

I have an image of a map and want to correlate latitude and longitude
to the x,y of the image. Is there a way to input a few points into a
mapping algorithm and then have it map the entire image? Is there a
java library dedicated to just this or some code that someone can
guide me to???

Thanks!
 
K

~kurt

Penn said:
I have an image of a map and want to correlate latitude and longitude
to the x,y of the image. Is there a way to input a few points into a

This is a very broad topic. It depends a lot on the map projection you
have. Some are kind of complicated. The easiest one to deal with is
probably the plate carrée.

<http://en.wikipedia.org/wiki/Plate_carrée_projection>

Bottom line, the first thing you have to determine is what projection
the map you have is in.
mapping algorithm and then have it map the entire image? Is there a
java library dedicated to just this or some code that someone can
guide me to???

I have no idea if there is one for Java. It is probably best to just
compute it on the fly. A couple years ago, I had found an open source
library in, I think it was C. It should be easy enough to google up.

- Kurt
 
T

Tris Orendorff

I have an image of a map and want to correlate latitude and longitude
to the x,y of the image. Is there a way to input a few points into a
mapping algorithm and then have it map the entire image? Is there a
java library dedicated to just this or some code that someone can
guide me to???

Check out the mapping and GIS resources at http://gislounge.com/ll/javaandgis.shtml before beginning.
 
S

Sygsky

Is there a way to input a few points into a
mapping algorithm and then have it map the entire image?


11-12 years ago I did something similar to your goal: bind cosmic
photo to the geographical map.
I used some method to create a polinomial equations of follow type:

x = A+ B*x1 + C*y1 + D*x1*x1 + E*x1*y1 + F*y1*y1 + G*x1*x1*y1 +
H*y1*y1*x1 + I*x1*x1*x1 + J*y1*y1*y1;

y = K + L*x1 + M*y1 + N*x1*x1 + O*x1*y1 + P*y1*y1 + Q*x1*x1*y1 +
R*y1*y1*x1 + S*x1*x1*x1 + T*y1*y1*y1;


x,y are wanted new coordinates in the map(or photo - as you need) from
a photo (or map) coordinates X1,Y1.

Coefficients from A to T are generated by the technique of least
squares in standard way. And, of course, you
need a quantity of reference poins not less than number of
coefficients. Also try to set referencies uniformly along the image.

I worked well for a practical usage so could work for your goal.
Deviations were near one pixel.
 
R

Roedy Green

I have an image of a map and want to correlate latitude and longitude
to the x,y of the image. Is there a way to input a few points into a
mapping algorithm and then have it map the entire image? Is there a
java library dedicated to just this or some code that someone can
guide me to???

there are two basic flavours of problem.

One is you have map of a municipality with roads, gas lines, telephone
poles each on separate maps. When you overlay the maps you discover to
your horror that they are out by hundreds of feet. You need a way of
synching them together. What you do is find survey points and mark
them on each of the maps. Then you use a sort of rubber sheet
transform that drags these points to the proper points on your
geographic grid. The points in between are interpolated. If this does
not give you accurate enough overlay, you go out and survey some more
points and mark them on your maps. Here we are treating the earth as
if it were a flat plane.

If you are mapping larger areas, the curvature of the earth comes into
play, and even the elongation and even and its pear-shaped ness. There
are dozens of co-ordinate systems for 2D and 3D mapping on the earth's
surface. The math is pretty hairy to convert between systems, but it
boils down to a lot of trigonometry.

Normally you use a mapping package that does these sorts of
transformations for you. Back in the 70s. Silicon Graphics was big in
this area.

Back then I got involved in photogrammetry for the local power
utility analysing aireal photographs to create 3D maps of powerlines
and "danger trees" monitoring when they might grow big enough to
interfere with the lines."

I was also involved in mapping pipes for the gas utility. I have not
kept up on how it has evolved since.
 
P

Penn

Thanks to all for the help. Being that I wanted a 'quick and dirty'
solution, I loved the suggestion from Sigsky and treated the mapping
of x and y to longitude and latitude as two separate 3D problems. I
solved for both of them and found that the fit for longitude performed
very well with a polynomial and the fit for latitude worked better
with a sinusoidal-type function. Both functions resulted in sub-pixel
errors in the prediction of the latitude-longitude location in my
image.

Thanks!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top