Changes between Version 5 and Version 6 of FDORfc39


Ignore:
Timestamp:
Jun 24, 2009, 12:49:19 PM (15 years ago)
Author:
danstoica
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FDORfc39

    v5 v6  
    3535A number of changes in FDO are proposed:
    3636
    37 1) Add new FdoSpatialOperations_Relate to FdoSpatialOperations enumeration
     371) Add new FdoSpatialOperations_Relate to FdoSpatialOperations enumeration.
    3838
    39392) Assign values to FdoSpatialOperations so they can be bitmapped:
    40 
    4140
    4241{{{
     
    5857}}}
    5958
    60 3) Enhance FdoSpatialCondition to handle a bitmapped mask of spatial operators. Avoid creating a new set of constructors just for RELATE by adding a extra optional parameter to existing constructors. Add setter and getter for the mask.
     593) Enhance FdoSpatialCondition class to handle a bitmapped mask of spatial operators. Avoid creating a new set of constructors just for RELATE, by adding an extra optional parameter to the existing constructors. Add setter and getter for the mask.
    6160
    6261
     
    7574    FDO_API static FdoSpatialCondition* Create(FdoIdentifier* propertyName, FdoSpatialOperations operation, FdoExpression* geometry, FdoInt32 relateMask = -1);
    7675
    77 //// The same extra optional parameter will be added all the constructors.
     76////\\\\ NOTE: the same extra optional parameter will be added to all the constructors.
    7877
    7978    /// Sets the bitmapped value of combined spatial operator(s) for RELATE usage.
     
    9190}}}
    9291
    93 4) Provide a common implementation for computing the pattern matrix in FdoSpatialUtility:
    9492
     934) Provide a common implementation for computing the pattern matrix in FdoSpatialUtility class. The matrixes for individual operations are available on the OGS site. Given a combination of operators, the method will perform an OR operation for each element of the matrix, interatively for each matrix involved.
    9594
    9695{{{
     
    104103    ///
    105104    /// \param value
    106     /// Input the bitmapped mask of FDO spatial operators.
     105    /// Input the bitmapped mask of FdoSpatialOperations.
    107106    ///
    108107    /// \return
    109108    /// Returns a valid 9 characters string representing the pattern matrix.
    110109    /// Returns NULL in case the input is invalid.
    111     /// Example: 'T*F**F***' for 'Within' spatial operation
     110    /// Example: 'T*F**F***' is returned for 'Within' spatial operation
    112111    ///
    113112    FDO_API static FdoString* GetOGSPatternMatrix(FdoInt32 value);
     
    115114
    116115== Implications ==
    117 [TODO]
     116
     117RDBMS providers supporting natively the RELATE spatial operator can implement the new API by examining the mask:
     118
     119{{{
     120      FdoSpatialCondition*  pFilter = ...
     121      Int32  mask = pFilter->GetRelateMask();
     122}}}
     123 
     124SqlServer Spatial or PostGIS need the string pattern matrix to pass it as input for STRelate() and ST_Relate() respectively:
     125 
     126{{{
     127     FdoString* matrix = FdoSpatialUtility::GetOGSPatternMatrix( mask );
     128
     129     // Build the SQL like: STRelate(' + matrix +');
     130}}}
     131
     132Oracle providers will inspect the bitmapped mask and extract the spatial operators to build the SQL like:
     133
     134{{{
     135     SDO_RELATE(... 'mask=touch+coveredby') = 'TRUE';
     136}}}
     137
    118138
    119139== Test Plan ==
     
    124144Autodesk to provide resources / funding.
    125145
     146== Referencies ==
     147[TODO]
     148