= FDO RFC 28 - Add Start/End Expression Functions = This page contains a request for comments document (RFC) for the FDO Open Source project. More FDO RFCs can be found on the [wiki:FDORfcs RFCs] page. == Status == ||RFC Template Version||(1.0)|| ||Submission Date||October 20, 2008|| ||Last Modified||Greg Boone[[Timestamp]]|| ||Author||Greg Boone|| ||RFC Status||Draft|| ||Implementation Status ||Pending|| ||Proposed Milestone||3.4.0.0|| ||Assigned PSC guide(s)||Greg Boone|| ||'''Voting History'''|| || ||+1|||| ||+0|||| ||-0|||| ||-1|||| == Overview == This RFC follows from RFC 8 by adding geometric functions for StartX, StartY, StartZ, EndX, EndY and EndZ. == Signatures == This RFC proposes the following signatures for the new functions: {{{ double StartX(); double StartY(); double StartZ(); double EndX(); double EndY(); double EndZ(); }}} All of the above functions accept a geometry property only. The result of the functions depend on the provided geometry: If the provided geometry is a point geometry, the result of the Start/End functions is the x, y, z values of the point.[[BR]] If the provided geometry is a multi-point geometry, the result of the Start/End functions is the x, y, z values of the first point.[[BR]] If the provided geometry is a line geometry, the result of the Start/End functions is the x, y, z values of the start and end points of the first line.[[BR]] If the provided geometry is a multi-line geometry, the result of the Start/End functions is the x, y, z values of the start and end points of the first line.[[BR]] If the provided geometry is a polygon geometry, the result of the Start/End functions is the x, y, z values of the start and end points of the exterior ring of the polygon.[[BR]] If the provided geometry is a multi-polygon geometry, the result of the Start/End functions is the x, y, z values of the start and end points of the exterior ring of the first polygon.[[BR]] === Example === {{{ FdoPtr select = (FdoISelect*)mConnection->CreateCommand (FdoCommandType_Select); select->SetFeatureClassName (L"POLE"); FdoPtr idColl = select->GetPropertyNames(); FdoPtr functionArgs = FdoExpressionCollection::Create(); FdoPtr arg1 = FdoIdentifier::Create(L"GEOMETRY"); functionArgs->Add(arg1); FdoPtr expr = FdoFunction::Create(L"STARTX", functionArgs); FdoPtr computedId = FdoComputedIdentifier::Create(L"POLE_STARTX", expr); idColl->Add(computedId); FdoPtr reader = select->Execute (); }}} == Affected Providers == This enhancement is being targeted to only affect the following providers: SDF. However, if a shared generic implementation can be designed, these functions may also be exposed through the SHP provider. == Required FDO Enhancements == No FDO enhancements are required. == Implications == This change will not cause any side-effects. No existing provider needs to change unless the provider wants to expose the new capability. == Test Plan == Existing unit tests will be enhanced to test those changes. == Funding/Resources == Autodesk to provide resource / funding to implement the feature for the affected providers.