Opened 13 years ago

Closed 13 years ago

#3867 closed enhancement (fixed)

Enhancing Gdal Omerc with gamma parameter

Reported by: alexckp Owned by: warmerdam
Priority: normal Milestone: 1.8.0
Component: default Version: unspecified
Severity: normal Keywords: omerc gamma
Cc:

Description

I recently downloaded QGIS version 1.6 and found that the omerc gamma parameter works perfectly when specifying the following parameters in the custom crs

+proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 +k=0.99984 +x_0=590476.87 +y_0=442857.65 +gamma=53.13010236111111 +ellps=evrstSS +towgs84=-533.4,669.2,-52.5,0,0,4.28,9.4 +units=m +no_defs

However, when this custom crs is applied to the layer, the gamma parameter is lost thus preventing the use of the on-the-fly transformation function.

After going through some previous posts in the qgis and gdal forums, I suspect that the problem is that the gamma parameter has not yet been implemented into gdal. Would be grateful if this can be confirmed and implemented.

Change History (1)

comment:1 by Even Rouault, 13 years ago

Milestone: 1.8.0
Resolution: fixed
Status: newclosed

Support for the +gamma parameter has been added into GDAL trunk (to be released GDAL 1.8.0 version), and also requires PROJ4 trunk version (to be released PROJ 4.8.0).

See http://trac.osgeo.org/proj/ticket/62 for the details

Provided that you have those 2 versions, you can have roundtrips between WKT representation and PROJ4 syntax :

$testepsg "+proj=omerc +lat_0=4 +lonc=115 +alpha=53.3158204722
2222 +k=0.99984 +x_0=590476.87 +y_0=442857.65 +gamma=53.13010236111111 +ellps=ev
rstSS +towgs84=-533.4,669.2,-52.5,0,0,4.28,9.4 +units=m +no_defs "

Validate Succeeds.
WKT[+proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 +k=0.99984 +x_0=5904
76.87 +y_0=442857.65 +gamma=53.13010236111111 +ellps=evrstSS +towgs84=-533.4,669
.2,-52.5,0,0,4.28,9.4 +units=m +no_defs ] =
PROJCS["unnamed",
    GEOGCS["Everest (Sabah & Sarawak)",
        DATUM["unknown",
            SPHEROID["evrstSS",6377298.556,300.8017],
            TOWGS84[-533.4,669.2,-52.5,0,0,4.28,9.4]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433]],
    PROJECTION["Hotine_Oblique_Mercator"],
    PARAMETER["latitude_of_center",4],
    PARAMETER["longitude_of_center",115],
    PARAMETER["azimuth",53.31582047222222],
    PARAMETER["rectified_grid_angle",53.13010236111111],
    PARAMETER["scale_factor",0.99984],
    PARAMETER["false_easting",590476.87],
    PARAMETER["false_northing",442857.65],
    UNIT["Meter",1]]

PROJ.4 rendering of [+proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 +k=
0.99984 +x_0=590476.87 +y_0=442857.65 +gamma=53.13010236111111 +ellps=evrstSS +t
owgs84=-533.4,669.2,-52.5,0,0,4.28,9.4 +units=m +no_defs ] = +proj=omerc +lat_0=
4 +lonc=115 +alpha=53.31582047222222 +k=0.99984 +x_0=590476.87 +y_0=442857.65 +g
amma=53.13010236111111 +ellps=evrstSS +towgs84=-533.4,669.2,-52.5,0,0,4.28,9.4 +
units=m +no_defs
Note: See TracTickets for help on using tickets.