<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Helvetica;
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:Helvetica;
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
color:black;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page Section1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=white lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Neil,<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Just chiming in to see if I can assist. Lat Long to UTM is very familiar
territory form me.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Just looking at your command line these no reason for proj4 to
return negative values.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>For typical UTM projections the standard zones are 6 degrees
wide all around the world. Often they are numbered. Increasing East and West
from Greenwich eg 0-6 degrees is Zone 1 etc.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>When using Proj the lon_0 represents the central meridian of a
zone. So the lon_0 for Zone 1 is 3. Think of this as the vertical axis of a
graph. Lat_0 is typically the equator eg 0 degree. Think of this as the
horizontal axis of a graph.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Your points fall into Zone 5 between longitudes 24 and 30 in the
Northern Hemishpere.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>So by nominating a lon_0 (correctly) of 27 degrees and by
omitting the lat_0 so defaulting to 0 degrees your points fall on the positive/positive
quadrant. The formulae that produces UTM will return positive values.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Often in the mapping industry we try NOT TO return negative
values. The way we do this and is supported by proj4 is the use of false
origins. The parameters x_0 and y_0 are used for this purpose.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>In Australia being South of the equator and using UTM the
negative latitudes produce “Northings” and any longitude West of
the Central Meridian produces negative “Eastings” To make them
positive we define a false origin 10 million metres South of the Central Meridian/Equator(True)
origin and 500,000 metres West of the true origin. That way all our Eastings
and Northings come out positive.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>In your case I can’t determine why you expect/want
negative Eastings, but perhaps the false origin may help.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Regards<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Andrew<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";
color:windowtext'>From:</span></b><span style='font-size:10.0pt;font-family:
"Tahoma","sans-serif";color:windowtext'> proj-bounces@lists.maptools.org
[mailto:proj-bounces@lists.maptools.org] <b>On Behalf Of </b>Neil Robinson<br>
<b>Sent:</b> Tuesday, 12 August 2008 6:10 PM<br>
<b>To:</b> geraldi.evenden@gmail.com<br>
<b>Cc:</b> proj@lists.maptools.org<br>
<b>Subject:</b> Re: [Proj] Re: Proj Digest, Vol 51, Issue 2<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span style='font-family:"Helvetica","sans-serif"'>Dear
Gerald,<br>
<br>
Thanks to your suggestion. In trying to give you a sample of expected output
I've tested things more thoroughly (I'm a chemical engineer by training, so
this geo-referenced mapping stuff is all new to me) and it does appear to be
working correctly -- almost.<br>
<br>
my input file, "Desktop/proj" had this:<br>
27.5 0.00<br>
27.5 10.0<br>
27.5 20.0<br>
27.5 30.0<br>
27.58676 26.18728 <br>
<br>
My commands and output from the console:<br>
<br>
neil@neil:~$ proj +proj=tmerc +ellps=WGS84 +lon_0=27 Desktop/proj<br>
55660.46 0.00<br>
54820.34 1105896.37<br>
52324.06 2212444.34<br>
48243.45 3320218.65<br>
58652.24 2897715.76 <br>
<br>
In each case, the magnitudes are correct (as far as I can tell using other
software) but the first column of values should all be negative.<br>
<br>
i.e. Desired output:<br>
-55660.46 0.00<br>
-54820.34 1105896.37<br>
-52324.06 2212444.34<br>
-48243.45 3320218.65<br>
-58652.24 2897715.76 </span><br>
<span style='font-family:"Helvetica","sans-serif"'><br>
</span><br>
Gerald I. Evenden wrote: <o:p></o:p></p>
<pre>On Monday 11 August 2008 4:07:58 am Neil Robinson wrote:<o:p></o:p></pre><pre> <o:p></o:p></pre>
<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>Hi Gerard,<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Thanks for your response. I realise that this isn't a support forum, but<o:p></o:p></pre><pre>I'm not getting any joy anywhere else and you are clearly very<o:p></o:p></pre><pre>knowledgeable on this topic<o:p></o:p></pre><pre> <o:p></o:p></pre></blockquote>
<pre> ...<o:p></o:p></pre><pre> <o:p></o:p></pre>
<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>I tried lodging a bug with qgis [1], but they seemed to think the problem<o:p></o:p></pre><pre>was with proj4 (although, through my ignorance that was my guess, so I<o:p></o:p></pre><pre>might have planted the seed of that conclusion).<o:p></o:p></pre><pre><o:p> </o:p></pre><pre> <o:p></o:p></pre>
<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>I would just use +proj=tmerc and put some added '-' flags to juggle the<o:p></o:p></pre><pre>I/O.<o:p></o:p></pre><pre>But that's somebody else's job as I only work on the library. ;-)<o:p></o:p></pre><pre> <o:p></o:p></pre></blockquote>
<pre>I tried this suggestion (I think I did), but negative zero doesn't make any<o:p></o:p></pre><pre>sense to proj4.<o:p></o:p></pre><pre>Without adding the '-' flags, this is what I think the parameters need to<o:p></o:p></pre><pre>be for one of the projections I'm interested in:<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>+proj=tmerc +ellps=WGS84 +lat_0 +lon_29 +k=1 +towgs84=0,0,0,0,0,0,0<o:p></o:p></pre><pre>+units=m +no_defs<o:p></o:p></pre><pre> <o:p></o:p></pre></blockquote>
<pre><o:p> </o:p></pre><pre>Can you give a sample input (lat/lon) and an approximation of what you expect <o:p></o:p></pre><pre>(without datum conversion which I cannot handle). Under normal circumstances <o:p></o:p></pre><pre>the above would generate (viewed as a console screen capture):<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>gie@charon:~$ lproj +proj=tmerc +ellps=WGS84 +lon_0=29<o:p></o:p></pre><pre>31 45<o:p></o:p></pre><pre>157693.72 4986890.93<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Note; option +towgs84 and +no_defs is not on my software and the other options <o:p></o:p></pre><pre>are defaulted as you explicitly specified.<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>The input is longitude(31), latitude(45) and the output is easting(x) and <o:p></o:p></pre><pre>northing(y) in meters.<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>What output would you prefer to see?<o:p></o:p></pre><pre><o:p> </o:p></pre><pre> <o:p></o:p></pre></div>
</body>
</html>