[Fdo-trac] [fdo-trac] #929: ISelect.SetFilter corrupts decimal values passed to data source

FDO trac_fdo at osgeo.org
Fri Jun 9 09:16:01 PDT 2017


#929: ISelect.SetFilter corrupts decimal values passed to data source
---------------------------+-----------------------
   Reporter:  beginbenoit  |      Owner:  gregboone
       Type:  defect       |     Status:  new
   Priority:  major        |  Milestone:  4.1.0
  Component:  FDO API      |    Version:  4.0.0
   Severity:  2            |   Keywords:
External ID:               |
---------------------------+-----------------------
 When setting the filter on an ISelect command, it appears as though
 certain decimal values get corrupted. An example of this is the value
 65.54 stored in a NUMBER(6,2) field in Oracle or in a DECIMAL(6,2) field
 in SQL Server. In both of these cases, the actual filter sent by FDO will
 be 65.54000000000001.

 The query obviously returns no results when this occurs. It doesn't seem
 to be provider specific or platform specific, as the issue was duplicated
 on Autodesk.Oracle and OSGeo.SQLServerSpatial on both AIMS 2017, Map 3D
 2017, FDO Toolbox and MGOS 3.0 and 3.1.

 Running the query with no filter will also tend to yield the proper value
 when going through the C# APIs, but if you hit up Mapguide via the
 mapagent.fcgi to run the query the invalid floating point value will be in
 the result XML.

 I know floating point memory structures are often not overly reliable, but
 in this case a user can get confused why he can get to the data he's
 looking for. I'm not sure if something can be done to improve the
 precision of the floating points used to make sure we atleast get 4-5
 digits of precision.

--
Ticket URL: <https://trac.osgeo.org/fdo/ticket/929>
FDO <http://fdo.osgeo.org/>
Feature Data Objects


More information about the fdo-trac mailing list