Changes between Version 16 and Version 17 of FDORfc28
- Timestamp:
- 11/05/08 12:11:19 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
FDORfc28
v16 v17 8 8 ||RFC Template Version||(1.0)|| 9 9 ||Submission Date||October 20, 2008|| 10 ||Last Modified|| Greg Boone[[Timestamp]]||10 ||Last Modified||Robert Fortin[[Timestamp]]|| 11 11 ||Author||Greg Boone|| 12 12 ||RFC Status||Draft|| … … 22 22 == Overview == 23 23 24 This RFC follows from RFC 8 by adding geometric functions for StartX, StartY, StartZ, EndX, EndY and EndZ.24 This RFC follows from RFC 8 by adding geometric functions to retrieve the X, Y, Z and M value of a point. 25 25 26 26 == Signatures == … … 30 30 31 31 {{{ 32 double StartX(<geometry property>); 33 double StartY(<geometry property>); 34 double StartZ(<geometry property>); 32 double X(<geometry property>); 33 double Y(<geometry property>); 34 double Z(<geometry property>); 35 double M(<geometry property>); 35 36 36 double EndX(<geometry property>);37 double EndY(<geometry property>);38 double EndZ(<geometry property>);39 37 }}} 40 38 41 All of the above functions accept a geometry property o nly. The result of the functions depend on the provided geometry:39 All of the above functions accept a geometry property of type point only. if the geometry is not a point or if the dimension of the geometry prevent from returning a proper value (e.g. Z() function on a 2D geometry), a null value is returned. 42 40 43 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]]44 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]]45 46 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]]47 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]]48 49 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]]50 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]]51 41 52 42 === Example === … … 61 51 FdoPtr<FdoIdentifier> arg1 = FdoIdentifier::Create(L"GEOMETRY"); 62 52 functionArgs->Add(arg1); 63 FdoPtr<FdoFunction> expr = FdoFunction::Create(L" STARTX", functionArgs);64 FdoPtr<FdoComputedIdentifier> computedId = FdoComputedIdentifier::Create(L"POLE_ STARTX", expr);53 FdoPtr<FdoFunction> expr = FdoFunction::Create(L"X", functionArgs); 54 FdoPtr<FdoComputedIdentifier> computedId = FdoComputedIdentifier::Create(L"POLE_X", expr); 65 55 idColl->Add(computedId); 66 56 67 57 FdoPtr<FdoIFeatureReader> reader = select->Execute (); 68 58 }}} 59 60 == Standard Considerations == 61 62 During the initial proposal of this RFC (which was focusing on returning the StartX/Y/Z and EndX/Y/Z of any geometry), many altertives were considered. The concensus was that fdo should try to use an existing standard. The function signature adopted here are based on the OGC [http://www.opengeospatial.org/standards/sfa Simple Feature Access] standard. 63 64 Other functions were considered for the initial RFC proposal but are __outside the scope__ of this RFC: 65 66 !StartPoint(): Point[[BR]] 67 !EndPoint(): Point[[BR]] 68 !NumPoints(): Int[[BR]] 69 PointN(N): Point[[BR]] 70 71 72 Using these additional functions in combination with the X,Y,Z and M functions, it would have been possible to return the start and end coordinate for other type of geometry. 73 74 Example: 75 To retrieve the X value for the first point of a line --> X(!StartPoint(<geometry>) or X(PointN(1, <geometry>)[[BR]] 76 To retrieve the Y value for the last point of a line --> Y(!EndPoint(<geometry>) or X(PointN(!NumPoints(<geometry>, <geometry>)[[BR]] 77 78 69 79 70 80 == Affected Providers ==