#4861 closed defect (fixed)
ESRI morphing broken for Mercator with non-zero standard_parallel_1
Reported by: | mikrit | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 2.0.3 |
Component: | OGR_SRS | Version: | 1.9.1 |
Severity: | normal | Keywords: | |
Cc: | Kyle Shannon |
Description
To reproduce, take the ESRI WKT for EPSG:3001 from http://help.arcgis.com/en/arcims/10.0/mainhelp/mergedProjects/ArcXMLGuide/elements/pcs.htm which (when pretty-printed) is
PROJCS["Batavia_NEIEZ", GEOGCS["GCS_Batavia", DATUM["D_Batavia", SPHEROID["Bessel_1841",6377397.155,299.1528128]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.0174532925199433]], PROJECTION["Mercator"], PARAMETER["False_Easting",3900000.0], PARAMETER["False_Northing",900000.0], PARAMETER["Central_Meridian",110.0], PARAMETER["Standard_Parallel_1",4.45405154589751], UNIT["Meter",1.0]]
Save it in a file called "Batavia_NEIEZ.prj" and do
gdalsrsinfo -p "Batavia_NEIEZ.prj"
which gives
PROJ.4 : '+proj=merc +lon_0=110 +lat_ts=4.45405154589751 +x_0=3900000 +y_0=90000 0 +ellps=bessel +units=m +no_defs ' OGC WKT : PROJCS["Batavia_NEIEZ", GEOGCS["GCS_Batavia", DATUM["Batavia", SPHEROID["Bessel_1841",6377397.155,299.1528128]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.0174532925199433]], PROJECTION["Mercator_1SP"], PARAMETER["False_Easting",3900000.0], PARAMETER["False_Northing",900000.0], PARAMETER["Central_Meridian",110.0], PARAMETER["latitude_of_origin",4.45405154589751], UNIT["Meter",1.0]]
Note that the standard_parallel_1 has been renamed to latitude_of_origin. That's not right.
- A standard parallel at 4.454... degrees North means that the scale factor has been adjusted so that the scale is true at that parallel. But the projected point (False_Easting, False_Northing) should still coincide with the geographic point (Central_Meridian, Latitude_of_Origin), which would be (110dE, 0dN) here since the Latitude_of_Origin of an ESRI Mercator definition is always zero, at least this was true in 2008: http://lists.osgeo.org/pipermail/metacrs/2008-November/000178.html
- On the other hand, a latitude_of_origin at 4.454... degrees North without a specified standard_parallel_1 or scale_factor, should mean that the scale is true on the equator, but (False_Easting, False_Northing) should coincide with (Central_Meridian, latitude_of_origin) which would be (110dE, 4.454...dN) here. That's different.
The erroneous renaming of standard_parallel_1 to latitude_of_origin was introduced in http://trac.osgeo.org/gdal/changeset/7542 . Some consolation is that the renaming doesn't happen when the projection name in ESRI WKT is given as "Mercator_2SP" or "Mercator (2SP)", which perhaps would be a better projection name. But the ArcGis page where I got the ESRI WKT uses just "Mercator".
An analogous ticket for Equidistant Cylindrical is http://trac.osgeo.org/gdal/ticket/3036 .
I can add that the confusion, at least for Equidistant Cylindrical, may be caused by old and bad EPSG terminology, where the Equidistant Cylindrical used to be Operation Method 9823 and have a "Latitude of Natural Origin" parameter that was really intended to be the standard parallel. This was changed as part of EPSG Change Request 2009.023, in that Operation Method 9823 was replaced by Operation Method 1028 where the parameter has the better name "Latitude of 1st standard parallel".
Attachments (1)
Change History (13)
comment:1 by , 10 years ago
Cc: | added |
---|
by , 8 years ago
Attachment: | scale_factor_to_first_standard_parellel.jpg added |
---|
Rough math proof to convert from scale factor at natural origin to first standard parallel
comment:3 by , 8 years ago
Sorry for my dubness, but on the example of that ticket what should be the corresponding OGC WKT: just changing "Mercator" to "Mercator_2SP" ? What would be the 2nd parallel: 0 ?
comment:4 by , 8 years ago
No worries, the 2SP convention confused me as well at the beginning.
For Mercator 2SP, both standard parallels are the same latitude in the different hemispheres. Since you can infer the second standard parallel simply by negating the first, it is usually implicitly defined and not specified as a parameter.
So, to answer your question, yes, I believe going from ESRI WKT to OGC WKT, you'd simply need to rename "Mercator" to SRS_PT_MERCATOR_2SP.
comment:5 by , 8 years ago
Ah you're right now I see http://www.remotesensing.org/geotiff/proj_list/mercator_2sp.html.
Hopefully fixed by r29414 "OSR: correctly transform Mercator_2SP and _1SP to ESRI Mercator, and back from ESRI Mercator to Mercator_2SP (#4861)"
Thanks for the maths. I've checked on one sample with gdaltransform that the 1SP and 2SP variants were equivalent.
comment:7 by , 8 years ago
Component: | default → OGR_SRS |
---|---|
Milestone: | → 2.0.1 |
Resolution: | → fixed |
Status: | new → closed |
Backported in branches/2.0 in r29421
comment:12 by , 7 years ago
Milestone: | 2.0.1 → 2.0.3 |
---|
A 2.0.3RC2 has been pushed, so this will be in final 2.0.3
I ran into this as well.
A couple of clarifications/observations/suggestions: