Opened 7 years ago

Closed 4 years ago

Last modified 4 years ago

#3191 closed defect (fixed)

[PATCH] Lambert_Conformal_Conic_2SP: Central_Parallel vs. latitude_of_origin

Reported by: peifer Owned by: Kyle Shannon
Priority: normal Milestone: 1.10.1
Component: OGR_SRS Version: 1.10.0
Severity: normal Keywords: ogrspatialreference
Cc: Kyle Shannon


I have a shapefile with the following SRS:

Layer SRS WKT:

It looks like GDAL/OGR does not understand PARAMETER["Central_Parallel",51.0] and subsequently, the features fall into Africa, about 5700 km South of their actual location. Changing the parameter name in the prj file to PARAMETER["latitude_of_origin",51.0] solves the issue. I guess there could be an alias Central_Parallel <-> latitude_of_origin ?

Attachments (1)

3191.patch (3.4 KB) - added by Kyle Shannon 4 years ago.
actual patch applied

Download all attachments as: .zip

Change History (9)

comment:1 Changed 4 years ago by 45136

Just another case, coming from an ESRI .prj file:

The Central_parallel value gets lost when reading it with gdalsrsinfo, or loading into QGIS.

Reading this article, ESRI treat central_parallel and latitude_of_origin as the same:

So I suggest GDAL should do the same when reading WKT.

comment:2 Changed 4 years ago by 45136


comment:3 Changed 4 years ago by Kyle Shannon

Cc: Kyle Shannon added
Keywords: ogrspatialreference added
Milestone: 1.10.1
Summary: Lambert_Conformal_Conic_2SP: Central_Parallel vs. latitude_of_origin[PATCH] Lambert_Conformal_Conic_2SP: Central_Parallel vs. latitude_of_origin

45136, Attached is a patch for review. OSR isn't my area of expertise, but I tried to match up with how other SRSs are handled. Hopefully someone will take a peek and vet it. Then either they can apply it or I can.

comment:4 Changed 4 years ago by Kyle Shannon

Also, test data would be helpful. I used the wkt on the ticket for a simple test in the python autotest suite, but a few more would be nice.

comment:5 Changed 4 years ago by Even Rouault

Kyle, this looks good to me. You can apply.

comment:6 Changed 4 years ago by Kyle Shannon

Owner: changed from warmerdam to Kyle Shannon
Status: newassigned

comment:7 Changed 4 years ago by Kyle Shannon

Resolution: fixed
Status: assignedclosed

I couldn't find enough evidence in the wild to add it to morphToESRI(), but morphFromESRI support is added. Fixed in trunk r26257 and branches/1.10 r26257.

comment:8 Changed 4 years ago by Kyle Shannon

whoops, trunk r26257, branches/1.10 r26258

Changed 4 years ago by Kyle Shannon

Attachment: 3191.patch added

actual patch applied

Note: See TracTickets for help on using tickets.