[Proj] How to Scale a Mercator projection?
Christopher Barker
Chris.Barker at noaa.gov
Wed Jul 26 02:00:02 EDT 2006
Gerald I. Evenden wrote:
> On Tuesday 25 July 2006 5:58 pm, Christopher Barker wrote:
>>ValueError: Failed to initialize PROJ.4 with `+proj=merc +lat_ts=29.1333
>>+lon_0=-89.583333 +k=0.000000 +x_0=100 +y_0=-2972000 +ellps=WGS84
>>+datum=WGS84 +units=m +no_defs '
> The above should generate an error:
And indeed it does. Actually, that error was helpful, because when I got
it, I could see what parameters were being passed into proj by the
wrapper code.
> In the case of proj=merc, lat_ts= when specified overides any specification of
> k_0.
I've figured that out now.
> lat_ts is commonly used on navigation charts. If k_0 is used, I suspect it is
> only used in trans-equator maps.
Well, I'm still confused. What does lat_ts mean? There is this
unfortunate typo in the docs:
"the +lat_ts parameter, which is the latitude at which the scale is 0."
Clearly that isn't supposed to be zero, but what is it supposed to be?
On the NOAA Navigational charts, a latitude is given at which the given
scale holds. That sounds to me like the latitude of true scale, but in
that case, you'd need the k_0 paramter, in addition to lat_ts.
How do I match the projection of a nautical chart?
Frank Warmerdam wrote:
> My understanding is that PROJ.4 does not support a latitude of origin
> (ie. lat_0) other than the equator.
I did see that in the docs, but I'm not sure that a latitude of origin
is the same as the latitude at which the given scale is correct. If it
it is, then perhaps it's time to patch PROJ to allow that - Nautical
charts are the most common use of the mercator projection, and the math
is just not that hard for this one.
I found this in the FAQ about the NOAA arc-view extension for reading
Nautical charts:
************
4.3 What's the "Latitude of True Scale" that Mercator charts ask for?
The latitude of true scale in a Mercator projection is the one latitude
for which distance measurements are correct. In general, a Mercator
chart will have a latitude of true scale in the center of the chart.
However, if the latitude of true scale given in the chart were applied,
it would not be possible to put multiple Mercator charts in a single
view. Therefore the developers have provided a means for allowing the
user to set the latitude of true scale that will be used for all
Mercator charts in a given view. When setting the latitude of true scale
for a view, two options are suggested: 0.0 degrees and the latitude of
true scale that is read from the chart being added. The drawback to
using 0.0 degrees is the resulting inaccurate measurements. Few, if any,
NOAA nautical charts actually have the equator in them; thus, the scale
is wrong everywhere in the chart and the error increases with latitude.
To allow the user to get reasonable distance measurements, a latitude of
true scale may be entered for the first Mercator chart added to the
view. Additional charts will use that latitude of true scale, so it is
wise to pick a value in the center of your anticipated work area. This
value does not have to be the original latitude of true scale of the
chart; you may want to pick a value that is close to the center of your
study area. Note that there will always be distortion, and therefore
error in distance measurements not on the latitude of true scale.
************
This implies to me that you should be able to set lat_ts and k_0. A
latitude of true scale without a scale isn't very useful. I guess you'd
get a scale of 1 there, which I guess means that units would be in
meters. Then I'd need to do the pixels-to-meters calculation after the
fact. Not a big deal, but I was hoping that it wouldn't be neccesary.
As a note, it seems that the ArcView extension isn't really doing a real
projection anyway -- all they do is determine the location of the corner
and the average size of the pixels from the reference points. Maybe I
should just do that.
Thanks for your help,
-Chris
More information about the Proj
mailing list