# [Proj] How to Scale a Mercator projection?

Gerald I. Evenden gerald.evenden at verizon.net
Wed Jul 26 20:15:43 EDT 2006

```On Wednesday 26 July 2006 4:40 pm, Christopher Barker wrote:
> Gerald,
>
> this.
>
> Gerald I. Evenden wrote:
> > 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.
>
> OK - got it. Can i assume that proj is outputting meters, then?
>
> > By "true" they mean that the scale at that latitude matches the scale
> > annotated in the margin of the map (1:xxx,xxx).
>
> That's what I thought.
>
> > 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.
>
> That's key. Thanks for clarifying that for me. I was looking to have
> Proj do the whole thing for me -- now that I know that It's not supposed
> to to that, I know what to do.
>
> But just in case, I think this is what I need to do:
>
> use:
>
> proj=merc +lat_ts=29.1333 +lon_0=-89.583333 +ellps=WGS84 +datum=WGS84
> +units=m

With the above parameters you should get x/y values in meters with the scale
factor of 1. at the latitude of 29+ degrees.  The datum= option is not part
of my libproj4 so I cannot comment on what effect that parameter has other
than possibly altering the input geographic coordinates.

> That will give me the coordinates in meters.

A factor mentioned in the original proj Open File manual was that the units of
the x/y values are always in the same units specified for the major axis: a=
or R=.  In this case the internal ellipsoid table list was use where *all*
values are in meters.

> Then I need to multiply this by the scale (1/80000) and divide the
> pixels per meter (10,000), to get pixels. then I need to shift to get
> the coordinates to (0,0) at the appropriate place.
>
> Another alternative is to set the false easting and false northing to
> get (0,0) in the right place. I think those are set in meters.

Again, any Cartesian unit value, like false easting and northing, must be in
the same units as the major axis.  In this case meters.

If one were working in India on earlier surveys one might be using the Indian
yard for a= and false easting and northing.  Similarly, the U.S. surveyor's
foot might be appropriate for NAD 28 coordinates.

The simple thing to remember that any Cartesian manipulations that you expect
proj to perform internally are in the same units of the major axis or radius.

Keep in mind that when you scale to map coordinates you will need to not only
do the map-scale multiplication (or division) but also the scaling to the
units of the graphic output device.  The transmogrification needed to get the
meters to the graphic output are why I considered them to be the
application's problem.

>
> I should be able to give this a try tomorrow.
>
> thanks,
>
> -Chris

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