[Gdal-dev] NaN values transformation in funtion Transform from OGRCoordinateTransformation class

Miguel Fernandes mgfernandes at ualg.pt
Mon Nov 12 13:51:39 EST 2007


Hello all,

I'm using version GDAL_svn_trunk_2007_11_04 and the behaviour I'm 
describing also happens in version 1.4.3. Using library OGR, class 
OGRCoordinateTransformation functions Transform and TransformEx in order 
to make coordinate transformations from latlon to utm29 for coastline 
coordinates that include NaN values in order to detach features like 
islands, the function is transforming the NaN values into Inf values.
The following output from a code before and after using the Transform 
function:

Coordinates before transformation in latlon and verification if the 
coordinate is a nan value.
x: -8.95006     y: 37             0 0
x: -8.95009     y: 37             0 0
x: -1.#IND     y: -1.#IND     1 1
x: -8.94716     y: 37             0 0
x: -8.94716     y: 37             0 0

Coordinates after transformation to UTM29 and verification if its a nan 
values:
x: 504444     y: 4.09488e+006         0 0
x: 504441     y: 4.09487e+006         0 0
x: 1.#INF     y: 1.#INF                     0 0
x: 504702     y: 4.09487e+006         0 0
x: 504702     y: 4.09488e+006         0 0

Is this behaviour correct or is this a bug?

Best Regards,
-- 
/Miguel Fernandes
/*
**Projecto ERSTA*
CIMA - Centro de Investigação Marinha Ambiental
Campus de Gambelas
8005-139 Faro
Portugal

+351 289800995 ext.7574
mgfernandes at ualg.pt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20071112/0f6a9d25/attachment.html


More information about the gdal-dev mailing list