[Proj] How to Scale a Mercator projection?

Gerald I. Evenden gerald.evenden at verizon.net
Wed Jul 26 08:27:06 PDT 2006


On Wednesday 26 July 2006 2:00 am, Christopher Barker wrote:
> 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."

Obviously an error.  Should read "scale factor is 1.0."

I use the term "scale factor" to mean a factor to multiply the annotated scale 
of the map to arrive at the true scale at a particular point.  For example: 
k_0=0.9996 is the scale factor along the CM of a Transverse Mercator map and 
means that the true scale is determined by 0.9996 x map-scale.

"lat_ts" means latitude of true scale or the latitude at which the scale is 
exactly that indicated by the map's margin scale.

> 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.

By "true" they mean that the scale at that latitude matches the scale 
annotated in the margin of the map (1:xxx,xxx).

> How do I match the projection of a nautical chart?

The projection is Mercator (normal).

> 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.

Latitude of origin does not necessarily have anything to do with scale.  It is 
only a point there the y(Northing)=0 for that particular latitude.  proj=merc 
does not provide for latitude of origin and y is always given from the 
equator (lat=0).

> 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.
> ************

The above description seems to muddy the waters rather than clear them.

The following example might be clearer:  say that a set of maps were desired 
for the Chesapeake Bay (an elongated NS system) that should allow for smooth 
mosaicing of maps of various latitudes.  Thus a latitude of true scale may be 
picked that is the central latitude of entire extent of the bay *and* its map 
series.  Consequencely, maps at the southern and northern extremities will 
not have a latitude of true scale within the boundaries of the map.  But the 
maps will match with their neighbors.

> 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.

Internally, proj does not allow simultaneous use of lat_ts and k_0.  Such use 
would grossly confuse usage.

Proj does *not* determine the scale of the projection in the general sense.  
That is determined by either scaling the major axis/radius (a=) or scaling 
the x/y output by the application.  Any map making application that uses proj 
should consider the map scale as the application's duty.

> 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

-- 
Jerry and the low-riders: Daisy Mae and Joshua
"Cogito cogito ergo cogito sum"
   Ambrose Bierce, The Devil's Dictionary



More information about the Proj mailing list