[Gdal-dev] IdrisiDataset::SetGeoTransform

Ari Jolma ari.jolma at tkk.fi
Sun Apr 1 11:32:22 EDT 2007


Mateusz Loskot wrote:
> Ari Jolma wrote:
>   
>> There's been an error long time (the only error) in the Perl bindings
>>  autotest because of IdrisiDataset::SetGeoTransform and a subsequent
>>  IdrisiDataset::GetGeoTransform failing to produce identical 
>> transformation. I thought I had reported it on the this list or as a
>>  bug, but can't find it anywhere.
>>
>> My question is should the IdrisiDataset::SetGeoTransform modify 
>> adfGeoTransform, from which is reported in GetGeoTransform? If not, 
>> then I can just skip that test, if yes, then that's probably a bug?
>>     
>
> Ari,
>
> According to my understanding, the IdrisiDataset::GetGeoTransform()
> fills passed array with transformation parameters, so it modifies the array.
>
> AFAIK, the semantic of IdrisiDataset::SetGeoTransform() is that the
> array with parameters is passed as read-only, so it shouldn't
> be modified.
>
> Even if the prototype of IdrisiDataset::SetGeoTransform() does not
> explicitly inform about constness of input parameter,
> I think it's safe to assume the following:
>
> IdrisiDataset::SetGeoTransform( double const* padfGeoTransform );
>   

I'm not being very clear I believe. In my eyes the fact that 
SetGeoTransform does not change the adfGeoTransform property (note *adf* 
not *padf*) of the object looks like a bug. It only changes some 
NameValues (?). When you ask the transformation parameters from the 
object using GetGeoTransform, it does not query these NameValues but the 
adfGeoTransform, which has not been changed. adfGeoTransform is 
initialized if a new dataset is created and it is filled (from the 
NameValues) in Open method, but not if SetGeoTransform is called.

>   
>> Then, I see the buildbot is running a csharp-test. Maybe it would be 
>> a good idea to run the Perl-bindings test? Regards,
>>     
>
> Ari, please send me instructions how to configure/run Perl bindings test
> and I will add it to the buildbot, no problem.
>   

in swig/perl and in Linux (can be done in Windows but it is really not 
so nice since it is difficult to delete the temporary files the test 
creates and it is much slower also):

make generate
make build
make test

The last step returns a report saying that 3 out of 1301 tests failed 
(the Idrisi set/getGeoTransform tests) and all ogr tests were ok. The 
report is standard Perl format.

Regards,

Ari

> Cheers
>   




More information about the Gdal-dev mailing list