[Proj] How to Scale a Mercator projection?
Christopher Barker
Chris.Barker at noaa.gov
Tue Jul 25 16:10:32 EDT 2006
Hi all,
I'm trying to figure out how to do a Mercator projection. I think I've
got how it's supposed to work, but I can't get the scale parameter to do
anything at all. On the proj4 command, it's either k=scale or k_0-scale,
neither does anything. Also, according to the docs:
"""
PROJ.4 does not support a latitude of natural origin other than the equator
"""
though that may be old. I also found:
"""
A more common formulation for Mercator is to drop the +k_0, and instead
to provide a latitude of true scale using the +lat_ts parameter, which
is the latitude at which the scale is 0
"""
Which I don't understand, as a scale can't be zero! in fact, if I try to
pass in 0 for k_0, I get an error.
However, whether I specify a +lat_ts or not, it makes no difference to
the output what I pass in for k (or k_0), except if I pass in 0 I get an
error.
I'm totally confused! Do I need to just do the scaling myself, after the
fact?
This is what I'm trying to do:
Nautical charts are in the Mercator projection (most of them, anyway). A
given chart has a known scale at a given latitude. I know the resolution
they scanned it at (pixels per inch, or whatever), so I know the scale
in terms of pixels. There are also a bunch of reference points, so I
should be able to figure out the false northing and false easting to
shift to pixel coords.
However, this all goes to heck if I can't set the scale.
I've spent way more time than it would have taken me to just write a
Mercator projection by hand, but I'd really like to figure out how to
use proj!
Can anyone make any suggestions?
-Chris
Here's some sample info:
Chart # 11361_1
Scale 1:80000 at 29.133 degrees North
10877 X 9391 pixel image
254 pixels per inch
Point near the top left corner:
pixel: long-lat
248,483 29.3502361111, -89.5500472222
Point near the bottom right corner:
pixel: long-lat
10587,6885 28.8880722222,-88.7000500000
It seems that that should be enough to figure out what I need!
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
More information about the Proj
mailing list