Opened 11 years ago
Closed 11 years ago
#4896 closed defect (fixed)
Problems with Mercator projection in IRIS driver
Reported by: | rveciana | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.10.0 |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
A user has noticed that the IRIS driver has a problem with MErcator projection. I attach a new version that solves the problem.
The problem was to consider that the projection had the origin at the point indicated as a reference in the file, and not another point, the projection reference point.
To calculate then the pixel size, is necessary to calculate the difference of degrees over the ellipsoid at the central point of the image, given in meters. To do it, I have used the Vincenty algorithm, taken from this page:
http://www.movable-type.co.uk/scripts/latlong-vincenty-direct.html
He asks only for attribution (I have added it in the code). Is this ok with GDAL licence?
I have also separated the geotransform calculation and projection calculation in a method, since they are now related (when the projection is Mercator). I hope that the code is still ok.
Attachments (1)
Change History (2)
by , 11 years ago
comment:1 by , 11 years ago
Milestone: | → 1.10.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Committed in r25233: "IRIS: fix problems with Mercator projection (by Roger Veciana, #4896)"
For a next time, please base your changes on the latest version of trunk (since I had made a few changes to your initial contribution)
I've changed a bit the way to attribute the code from Chris Veness, mainly to mention this is a CC-BY 3.0 licence, which according to my understanding is compatible with X/MIT.
The frmts/iris contents with the corrected Mercator projection