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