<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div style="font-family: arial, helvetica, sans-serif; "><span>Gabor,</span></div><div style="font-family: arial, helvetica, sans-serif; "><span><br></span></div><div style="font-family: arial, helvetica, sans-serif; "><span>> </span><span style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">But then I changed the order of coordinates, so longitude first, latitude </span><span style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">second...</span></div><div style="font-family: arial, helvetica, sans-serif; "><span><br></span></div><div style="font-family: arial, helvetica, sans-serif; "><span>That was my mistake! When I put longitude first, latitude second, I also get sensible numbers.</span></div><div style="font-family: arial, helvetica, sans-serif;
"><span><br></span></div><div style="font-family: arial, helvetica, sans-serif; "><span>So proj wants "x, y", not "latitude, longitude", even when you are feeding it </span><span style="font-size: 12pt; ">latitude, longitude.</span></div><div style="font-family: arial, helvetica, sans-serif; "><span style="font-size: 12pt; "><br></span></div><div style="font-family: arial, helvetica, sans-serif; "><span style="font-size: 12pt; ">I should have caught that.</span></div><div style="font-family: arial, helvetica, sans-serif; "><span><br></span></div><div style="font-family: arial, helvetica, sans-serif; "><span>Sorry for the trouble!</span></div><div style="font-family: arial, helvetica, sans-serif; "><span><br></span></div><div style="font-family: arial, helvetica, sans-serif; "><span>Thanks,</span></div><div style="font-family: arial, helvetica, sans-serif; "><span><br></span></div><div style="font-family: arial, helvetica, sans-serif;
"><span>Rick</span></div><div style="font-family: arial, helvetica, sans-serif; "><span><br></span></div><div style="font-family: arial, helvetica, sans-serif; "><br></div> <div style="font-size: 12pt; font-family: arial, helvetica, sans-serif; "> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> "molnar@sas.elte.hu" <molnar@sas.elte.hu><br> <b><span style="font-weight: bold;">To:</span></b> Rick Graves <gravesricharde@yahoo.com>; PROJ.4 and general Projections Discussions <proj@lists.maptools.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Monday, July 23, 2012 3:59 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Proj] does proj.4 work with Hotine Oblique Mercator?<br> </font> </div> <br>
Hi Rick!<br><br>First I also got very similar results as you (using the +no_uoff parameter).<br>But then I changed the order of coordinates, so longitude first, latitude<br>second...<br>It seems to be in the bounding box, but i have not checked it in detail.<br>Good luck,<br><br>Gabor Molnar<br><br><br>C:\Program Files\#######\>proj -v +proj=omerc +lat_0=45.30916666666666<br>+lonc=-86 +alpha=337.25556 +k_0=0.9996 +x_0=2546731.496 +y_0=-4354009.816<br>+no_uoff<br>#Oblique Mercator<br># Cyl, Sph&Ell<br># no_rot rot_conv no_uoff and<br># alpha= lonc= or<br># lon_1= lat_1= lon_2= lat_2=<br># +proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.25556 +k_0=0.9996<br># +x_0=2546731.496 +y_0=-4354009.816 +no_uoff +ellps=WGS84<br>45 -86<br>-10249168.62 22654031.15<br>42d15n 83d45w<br>-9992196.95 22682402.40<br>83d45w
42d15n<br>685493.47 191370.74<br><br><br><br>> Mikael,<br>><br>> When I add the +no_uoff parameter, I get different numbers for Ann Arbor<br>> Michigan:<br>><br>> -9992196.95 22682402.40<br>><br>><br>> They are also out of bounds -- all 4 bounding box numbers have 6 figures<br>> to the left of the decimal point. I am assuming that the Michigan<br>> shapefile is OK. The difference between the bounding box limits is<br>> approximately 600-700 km, which seems correct (I measured a road atlas<br>> using a long ruler).<br>><br>> The figures I got using the no_uoff parameter are more than 6 figures to<br>> the left of the decimal point.<br>><br>> The gamma parameter makes no difference with the no_uoff parameter. The<br>> gamma parameter without the no_uoff parameter gives different numbers for<br>> Ann Arbor:<br>><br>> -7945305.71
17799792.28<br>><br>><br>> Still out of bounds.<br>><br>> I have proj Rel. 4.7.1, 23 September 2009 (came with ubuntu Linux 12.04).<br>><br>> Am I making some mistake, or does proj.4 not work with Hotine Oblique<br>> Mercator?<br>><br>> Thanks,<br>><br>><br>> Rick<br>><br>><br>> ________________________________<br>> From: Mikael Rittri <<a ymailto="mailto:Mikael.Rittri@carmenta.com" href="mailto:Mikael.Rittri@carmenta.com">Mikael.Rittri@carmenta.com</a>><br>> To: Rick Graves <<a ymailto="mailto:gravesricharde@yahoo.com" href="mailto:gravesricharde@yahoo.com">gravesricharde@yahoo.com</a>>; PROJ.4 and generalProjections<br>> Discussions <<a ymailto="mailto:proj@lists.maptools.org" href="mailto:proj@lists.maptools.org">proj@lists.maptools.org</a>><br>> Cc: "<a ymailto="mailto:proj@lists.maptools.org"
href="mailto:proj@lists.maptools.org">proj@lists.maptools.org</a>" <<a ymailto="mailto:proj@lists.maptools.org" href="mailto:proj@lists.maptools.org">proj@lists.maptools.org</a>><br>> Sent: Sunday, July 22, 2012 12:21 PM<br>> Subject: Re: [Proj] does proj.4 work with Hotine Oblique Mercator?<br>><br>><br>> Hello Rick.<br>> You need to add <br>><br>> +no_uoff<br>><br>> to your Proj.4 definition. This is just a flag, so it doesn't need any<br>> numerical value.<br>> But it must be included so that you get what EPSG calls "Hotine Oblique<br>> Mercator Variant A".<br>> Without it, you get the Variant B instead. One could say that the Hotine<br>> Oblique Mercator class has two<br>> distinct construction methods (for historical reasons), and the GIS<br>> community hasn't been able<br>> to agree to use only one. <br>><br>> The names Variant A and B are fairly
recent EPSG names. In WKT etc., other<br>> names for the <br>> variants appear (usually different for different WKT dialects).<br>><br>> See also http://trac.osgeo.org/proj/ticket/104<br>><br>> (Possibly, with Proj 4.8.0 you should also add<br>><br>> +gamma=337.25556<br>><br>> for the rectified grid angle, but I think an omitted gamma defaults to the<br>> given alpha value,<br>> so an explicit gamma is probably unnecessary in your case.)<br>><br>> Best regards,<br>><br>> Mikael Rittri<br>> Carmenta<br>> Sweden<br>> http://www.carmenta.com<br>><br>> 22 jul 2012 kl. 18:42 skrev "Rick Graves" <<a ymailto="mailto:gravesricharde@yahoo.com" href="mailto:gravesricharde@yahoo.com">gravesricharde@yahoo.com</a>>:<br>><br>><br>> Hey,<br>>><br>>><br>>>I am not sure that proj.4 is converting latitude and longitude<br>>> into Hotine
Oblique Mercator coordinates correctly. (But I am a newbie<br>>> at cartography and such, so please bear with me, I could be making a<br>>> mistake.)<br>>><br>>><br>>>As a result of the 2010 census in the USA, many states have redrawn their<br>>> congressional districts. Michigan is one, and the shapefiles for their<br>>> new districts were created using the Hotine Oblique Mercator projection<br>>> to get the whole state onto one map with a minimum of overall distortion.<br>>> There is a map and explanation here:<br>>><br>>><br>>><a href="http://www.michigan.gov/documents/DNR_Map_Proj_and_MI_Georef_Info_20889_7.pdf" target="_blank">http://www.michigan.gov/documents/DNR_Map_Proj_and_MI_Georef_Info_20889_7.pdf</a><br>>><br>>><br>>><br>>>One can download Michigan's new Congressional district shapefiles from<br>>>
here:<br>>><br>>><br>>><a href="http://www.mcgi.state.mi.us/mgdl/?rel=thext&action=thmname&cid=9&cat=Legislative+Districts+2010+US+Congress" target="_blank">http://www.mcgi.state.mi.us/mgdl/?rel=thext&action=thmname&cid=9&cat=Legislative+Districts+2010+US+Congress</a><br>>><br>>><br>>><br>>>The included prj file has this info:<br>>><br>>><br>>>PROJCS["NAD83 / Michigan Oblique Mercator",<br>>>GEOGCS["NAD83",<br>>> DATUM["North_American_Datum_1983",<br>>>SPHEROID["GRS 1980",6378137,298.257222101,<br>>> AUTHORITY["EPSG","7019"]],<br>>>AUTHORITY["EPSG","6269"]],<br>>> PRIMEM["Greenwich",0,<br>>>AUTHORITY["EPSG","8901"]],<br>>> UNIT["degree",0.01745329251994328,<br>>>AUTHORITY["EPSG","9122"]],<br>>>
AUTHORITY["EPSG","4269"]],<br>>>UNIT["metre",1,<br>>> AUTHORITY["EPSG","9001"]],<br>>>PROJECTION["Hotine_Oblique_Mercator"],<br>>>PARAMETER["latitude_of_center",45.30916666666666],<br>>>PARAMETER["longitude_of_center",-86],<br>>>PARAMETER["azimuth",337.25556],<br>>>PARAMETER["rectified_grid_angle",337.25556],<br>>>PARAMETER["scale_factor",0.9996],<br>>>PARAMETER["false_easting",2546731.496],<br>>>PARAMETER["false_northing",-4354009.816],<br>>>AUTHORITY["EPSG","3078"],<br>>>AXIS["X",EAST],<br>>>AXIS["Y",NORTH]]<br>>><br>>><br>>>This page has info on the Hotine Oblique Mercator:<br>>><br>>><br>>><a href="http://www.remotesensing.org/geotiff/proj_list/hotine_oblique_mercator.html" target="_blank">http://www.remotesensing.org/geotiff/proj_list/hotine_oblique_mercator.html</a><br>>><br>>><br>>><br>>>Using
that, I came up with this command to invoke proj:<br>>><br>>><br>>>proj +proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.25556<br>>> +k_0=0.9996 +x_0=2546731.496 +y_0=-4354009.816<br>>><br>>><br>>>I get a latitude and longitude for Ann Arbor Michigan of 42 15 N - 83 45<br>>> W here:<br>>><br>>><br>>><a href="http://wiki.answers.com/Q/What_is_the_latitude_and_longitude_of_ann_arbor_mi" target="_blank">http://wiki.answers.com/Q/What_is_the_latitude_and_longitude_of_ann_arbor_mi</a><br>>><br>>><br>>><br>>>Plugging 42d15N 83d45W into proj, I get -7945305.71 17799792.28. But the<br>>> bounding box of the entire state's shape file is this:<br>>><br>>><br>>>161318.17712499946, 128066.04250000045, 791832.2827499993,<br>>> 859206.8181249984<br>>><br>>><br>>><br>>>The values I get from proj
are both out of bounds. <br>>><br>>><br>>>Am I doing something wrong?<br>>><br>>><br>>>Thanks,<br>>><br>>><br>>>Rick Graves<br>>><br>>><br>> _______________________________________________<br>>>Proj mailing list<br>>><a ymailto="mailto:Proj@lists.maptools.org" href="mailto:Proj@lists.maptools.org">Proj@lists.maptools.org</a><br>>><a href="http://lists.maptools.org/mailman/listinfo/proj_______________________________________________" target="_blank">http://lists.maptools.org/mailman/listinfo/proj_______________________________________________</a><br>> Proj mailing list<br>> <a ymailto="mailto:Proj@lists.maptools.org" href="mailto:Proj@lists.maptools.org">Proj@lists.maptools.org</a><br>> <a href="http://lists.maptools.org/mailman/listinfo/proj" target="_blank">http://lists.maptools.org/mailman/listinfo/proj</a><br><br><br><br> </div> </div>
</div></body></html>