Changes between Version 5 and Version 6 of FDORfc49
- Timestamp:
- 06/02/10 07:53:56 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
FDORfc49
v5 v6 6 6 == Status == 7 7 8 ||RFC Template Version|| (1.0)||9 ||Submission Date|| (Jun. 02 2010)||10 ||Last Modified|| (Romica Dascalescu)[[Timestamp]]||11 ||Author|| (Romica Dascalescu)||12 ||RFC Status|| (draft)||13 ||Implementation Status|| (draft)||14 ||Proposed Milestone|| (3.6.0.0)||15 ||Assigned PSC guide(s)|| (when determined)||8 ||RFC Template Version||1.0|| 9 ||Submission Date||Jun. 02 2010|| 10 ||Last Modified||Romica Dascalescu [[Timestamp]]|| 11 ||Author||Romica Dascalescu|| 12 ||RFC Status||Draft|| 13 ||Implementation Status||Pending|| 14 ||Proposed Milestone||3.6.0.0|| 15 ||Assigned PSC guide(s)||Greg Boone|| 16 16 ||'''Voting History'''||(vote date)|| 17 17 ||+1|||| … … 29 29 30 30 {{{ 31 //those numbers are very small and provide 32 //the tolerance needed for "exact" computations, 33 //i.e. CAD style non-FDO geometry intersection. 31 32 /// These numbers are very small and provide 33 /// the tolerance needed for "exact" computations, 34 /// i.e. CAD style non-FDO geometry intersection. 35 /// 34 36 #define EPSILON 1e-10 35 37 #define NEGEPSILON -EPSILON … … 37 39 }}} 38 40 39 Here we try to change the FDO API for spatial evaluation ( FdoSpatialUtility - FDOSpatial.dll) used by providers like SQLite, SDF, SHP and not providers likeKingOracle or SQL Spatial Server where the spatial evaluation is done on the server side.41 Here we try to change the FDO API for spatial evaluation (!FdoSpatialUtility - FDOSpatial.dll) used by providers like SQLite, SDF, SHP and not providers like !KingOracle or SQL Spatial Server where the spatial evaluation is done on the server side. 40 42 41 The idea is to add support in FDO API for passing the tolerance into the spatial utility. 42 FDO has already support for those tolerances, so user can provide them when a new spatial context is created. Also those values can later be obtained using a spatial context reader. Each class in FDO has a dedicated spatial context reader. The provider can get those tolerances (XY and Z) by getting the spatial context of the class before running the spatial evaluation. Since providers might want to have 0.0 tolerances we cannot pass default values as 0.0, so we can pass 1e-10 same as before this RFC, which is the default value used by FDO API. If the spatial condition is a 2D evaluation the Z tolerance will be ignored. 43 The idea behind this RFC is to add support in FDO API for passing the tolerance into the spatial utility. FDO has already support for tolerances, so users can provide them when a new spatial context is created. Also those values can later be obtained using a spatial context reader. Each class in FDO has a dedicated spatial context reader. The provider can get those tolerances (XY and Z) by getting the spatial context of the class before running the spatial evaluation. Since providers might want to have 0.0 tolerances we cannot pass default values as 0.0, so we can pass 1e-10 same as before this RFC, which is the default value used by FDO API. If the spatial condition is a 2D evaluation the Z tolerance will be ignored. 43 44 44 45 == Proposed Solution == … … 47 48 48 49 {{{ 50 49 51 /// \brief 50 /// Spatial utility class. 52 /// Spatial Utility Class. 53 /// 51 54 class FdoSpatialUtility 52 55 { 53 56 public: 54 57 /// \brief 55 /// Evaluates if two FDO geometric objects spatially interact with each other based on a user supplied spatial operator. 56 /// For example: Contains, Crosses, Disjoint, Equals, Intersects, Overlaps, Touches, Within, CoveredBy, Inside, EnvelopeIntersects. 58 /// Evaluates if two FDO geometric objects spatially interact with each other 59 /// based on a user supplied spatial operator. For example: Contains, Crosses, 60 /// Disjoint, Equals, Intersects, Overlaps, Touches, Within, CoveredBy, Inside, 61 /// EnvelopeIntersects. 57 62 /// 58 63 /// \param g1 … … 60 65 /// \param op 61 66 /// Input The spatial operation to apply to the left and right hand geometries 62 67 /// \param g2 63 68 /// Input Right hand Geometry to Evaluate 64 69 /// … … 73 78 /// Returns the evaluation of spatial operation. 74 79 /// 75 FDO_SPATIAL_API static bool Evaluate(FdoIGeometry* g1, FdoSpatialOperations op, FdoIGeometry* g2, double toleranceXY = 1e-10, double toleranceZ = 1e-10); 80 FDO_SPATIAL_API static bool Evaluate(FdoIGeometry* g1, 81 FdoSpatialOperations op, 82 FdoIGeometry* g2, 83 double toleranceXY = 1e-10, 84 double toleranceZ = 1e-10); 85 86 87 76 88 }}} 77 89 … … 79 91 == Managed FDO API == 80 92 81 The FDO Managed Interfaces will be updated in a similar manner to reflect the proposed changes (adding a new function which takes an additional parameter named tolerance).93 The FDO Managed Interfaces will be updated in a similar manner to reflect the proposed C++ API changes. 82 94 83 95 == Provider Implementation == 84 96 85 Initially, we need this for SQLite provider. Other provider developers can use it and use it as needed. No change is required in other providers. SQLite provider must be changed in order to be able to store those tolerances. Right now the provider keeps just a few values for spatial context like srid, name, WKT, auth_Text, auth_srid, and we have to add tolerances. The old versions of provider will ignore those new columns, and the new provider in case will not find these tolerances will use the default values. All other providers don’t have to be changed and 1e-10 will be passed. Each provider will handle tolerances as they want. This RFC will not force providers to use the tolerance from spatial context (even that should be the right thing to do). 97 Initially, the changes identified by this RFC are needed for the SQLite Provider. Other provider developers can provide support for these values on an as-needed basis. However, no change is required in other providers. The SQLite Provider will be changed in order to be able to store those tolerances. Right now the provider keeps just a few values for spatial context like srid, name, WKT, auth_Text, auth_srid. Tolerances will be added to that list. Older versions of the SQLite provider will ignore those new columns, and the new provider in case will not find these tolerances, will use the default values. All other providers don’t have to be changed and 1e-10 will be passed. Each provider will handle tolerances as they want. This RFC will not force providers to use the tolerance from spatial context (even that should be the right thing to do). 98 86 99 This RFC will just add to the spatial FDO functions two new parameters, having as default values the values used till now (hard-coded values) in order to make possible that some providers which cares about tolerance to be able to use it. 100 87 101 FDO spatial API had no way to pass tolerances and it used an internal hard-coded one making impossible for providers like SQLite to evaluate spatial queries having a certain tolerance. 88 102