[Gdal-dev] Expose Array Based Coordinate Transformation Methods
in CoordinateTransformation (#1615)
Ari Jolma
ari.jolma at tkk.fi
Sun May 6 16:49:10 EDT 2007
Tamas Szekeres kirjoitti:
> Hi All,
>
> I had a first crack at adding CoordinateTransformation.TransformPoints
> to the SWIG interface to provide the transformation of the given
> number of points passed as arrays of coordinates.
> I've tested the code for the C# bindings and worked pretty well. If
> someone have further issues please give me a comment at:
> http://trac.osgeo.org/gdal/ticket/1615
Sorry, I'll comment here. This is from point of view of Perl bindings.
You are using typemap "double argout[ANY]" which seems to require that
you know the ANY beforehand. The same typemap is implicitly used
elsewhere in GCPsToGeoTransform where ANY is 6.
This case seems to require a malloc, a copy to the malloced array, and
after the call a copy to a new Perl array, and freeing of the malloced
array.
I need to at least define a new typemap and that seems to mean that I
can't use "double argout[ANY]". The new typemap could be something like
"double *inout", but I don't know how the nCount gets set (and there are
possibly three values for it since there are three input arrays). I'd be
inclined to use something like "int, double *, double *, double *"
typemap since this kind of data is easiest to keep in one 2D array in Perl.
At this point, however, I'd like to postpone implementing this method in
the Perl bindings.
Regards,
Ari
>
> Best regards,
>
> Tamas
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/gdal-dev
More information about the Gdal-dev
mailing list