[Gdal-dev] OGR transforms
Curt, WE7U
archer at eskimo.com
Thu Oct 14 17:20:42 EDT 2004
On Thu, 14 Oct 2004, Curt, WE7U wrote:
> It appears to be this particular OCTTransform() that is causing the
> warnings spelled out earlier. I'll try the latest release of GDAL
> to see if the warnings go away.
>
>
> if (reverse_transformH) {
> // Convert our view coordinates from WGS84 to this map
> // layer's coordinates.
> // if (!OCTTransform(reverse_transformH, 2, ViewX, ViewY, ViewZ)) {
> if (!OCTTransform(reverse_transformH, 2, ViewX, ViewY, NULL)) {
> fprintf(stderr,
> "Couldn't convert points from WGS84 to map's spatial reference\n");
> }
> OCTDestroyCoordinateTransformation(reverse_transformH);
> reverse_transformH = NULL;
> }
Yep, that was the problem all right! I needed to copy the original
WGS84 lat/long values into the ViewX/Y/Z arrays before doing the
transform each time. Originally I had that code outside the layer
loop and so didn't have to worry about converting the same values
twice/three/XXX times.
So... It's a never-mind sort of an issue. ;-)
--
Curt, WE7U http://www.eskimo.com/~archer
"Lotto: A tax on people who are bad at math." -- unknown
"Windows: Microsoft's tax on computer illiterates." -- WE7U
"The world DOES revolve around me: I picked the coordinate system!"
More information about the Gdal-dev
mailing list