[Gdal-dev] Building a Projection Dialog

Ari Jolma ari.jolma at tkk.fi
Tue May 12 01:58:35 EDT 2009


Even Rouault kirjoitti:
> Indeed, the OPT functions are exposed through swig.
>
>
> I've checked that the Python osr.GetProjectionMethods() works as expected, but 
> I wouldn't be surprised if the other languages miss the necessary typemaps

Perl code:

use Geo::GDAL;

my $methods = Geo::OSR::GetProjectionMethods;
for my $method (@$methods) {
    my ($params, $projection) = 
Geo::OSR::GetProjectionMethodParameterList($method);
    print "PROJECTION METHOD: $projection\n";
    for my $param (@$params) {
        my ($name, $type, $defaultval) = 
Geo::OSR::GetProjectionMethodParamInfo($method, $param);
        print "  PARAMETER: $name, TYPE: $type, DEFAULT VALUE: 
$defaultval\n";
    }
}

Lists human readable names of known projection methods and their 
parameters with types and default values.

Ari

-- 
Prof. Ari Jolma
Environmental Management Information Technology
Teknillinen Korkeakoulu / Helsinki University of Technology
tel: +358 9 4511 address: POBox 5300, 02015 TKK, Finland
Email: ari.jolma at tkk.fi URL: http://geoinformatics.tkk.fi



More information about the gdal-dev mailing list