Opened 12 years ago
Closed 12 years ago
#1997 closed defect (wontfix)
NaN values transformation in funtion Transform from OGRCoordinateTransformation class
Reported by: | mgfernandes | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | OGR_SRS | Version: | svn-trunk |
Severity: | normal | Keywords: | NaN |
Cc: |
Description (last modified by )
When trying to transform an array with WGS84 latlon coordinates which has NaN values incorporated to UTM29 using functions Transform or TransformEX from class OGRCoordinateTransformation, the coordinates are transformed ok but the NaN values are transformed to Inf. This is the output from the test case I've attached:
Coordinates before transformation:
x: -8.95006 y: 37 -> is x nan: 0 is y nan: 0 x: -8.95009 y: 37 -> is x nan: 0 is y nan: 0 x: -1.#IND y: -1.#IND -> is x nan: 1 is y nan: 1 x: -8.94716 y: 37 -> is x nan: 0 is y nan: 0 x: -8.94716 y: 37 -> is x nan: 0 is y nan: 0
Coordinates after transformation:
x: 504444 y: 4.09488e+006 -> is x nan: 0 is y nan: 0 x: 504441 y: 4.09487e+006 -> is x nan: 0 is y nan: 0 x: 1.#INF y: 1.#INF -> is x nan: 0 is y nan: 0 x: 504702 y: 4.09487e+006 -> is x nan: 0 is y nan: 0 x: 504702 y: 4.09488e+006 -> is x nan: 0 is y nan: 0
The NaN values should be maintained.
Attachments (1)
Change History (5)
Changed 12 years ago by
comment:1 Changed 12 years ago by
Component: | OGR_SF → OGR_SRS |
---|---|
Description: | modified (diff) |
Keywords: | NaN added |
comment:2 Changed 12 years ago by
Status: | new → assigned |
---|
Miguel,
What makes you think that the OGRCoordinateTransformation() function should treat NaN values in any particular way? Generally speaking GDAL and OGR services do *not* support NaN as an input and behavior is undefined when it is given.
comment:3 Changed 12 years ago by
Hello,
My interpretation of not treating values was that they were maintained from the input to the output but maybe i misinterpreted. If this behaviour is as it should be then I can close the ticket.
Best Regards, Miguel Fernandes
comment:4 Changed 12 years ago by
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
Miguel,
There are no guarantees of special treatment of NaN for the coordinate transformation API (or the rest of GDAL/OGR really) so I'll close this ticket.
Transformation from latlon to utm29 using Transform from OGRCoordinateTransformation