Changes between Version 16 and Version 17 of FDORfc28


Ignore:
Timestamp:
Nov 5, 2008, 12:11:19 PM (16 years ago)
Author:
robertfortin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FDORfc28

    v16 v17  
    88||RFC Template Version||(1.0)||
    99||Submission Date||October 20, 2008||
    10 ||Last Modified||Greg Boone[[Timestamp]]||
     10||Last Modified||Robert Fortin[[Timestamp]]||
    1111||Author||Greg Boone||
    1212||RFC Status||Draft||
     
    2222== Overview ==
    2323
    24 This RFC follows from RFC 8 by adding geometric functions for StartX, StartY, StartZ, EndX, EndY and EndZ.
     24This RFC follows from RFC 8 by adding geometric functions to retrieve the X, Y, Z and M value of a point.
    2525
    2626== Signatures ==
     
    3030
    3131{{{
    32 double StartX(<geometry property>);
    33 double StartY(<geometry property>);
    34 double StartZ(<geometry property>);
     32double X(<geometry property>);
     33double Y(<geometry property>);
     34double Z(<geometry property>);
     35double M(<geometry property>);
    3536
    36 double EndX(<geometry property>);
    37 double EndY(<geometry property>);
    38 double EndZ(<geometry property>);
    3937}}}
    4038
    41 All of the above functions accept a geometry property only. The result of the functions depend on the provided geometry:
     39All 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.
    4240
    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]]
    5141
    5242=== Example ===
     
    6151FdoPtr<FdoIdentifier> arg1 = FdoIdentifier::Create(L"GEOMETRY");
    6252functionArgs->Add(arg1);
    63 FdoPtr<FdoFunction> expr = FdoFunction::Create(L"STARTX", functionArgs);
    64 FdoPtr<FdoComputedIdentifier> computedId = FdoComputedIdentifier::Create(L"POLE_STARTX", expr);
     53FdoPtr<FdoFunction> expr = FdoFunction::Create(L"X", functionArgs);
     54FdoPtr<FdoComputedIdentifier> computedId = FdoComputedIdentifier::Create(L"POLE_X", expr);
    6555idColl->Add(computedId);
    6656
    6757FdoPtr<FdoIFeatureReader> reader = select->Execute ();
    6858}}}
     59
     60== Standard Considerations ==
     61
     62During 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
     64Other 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
     72Using 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
     74Example:
     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
    6979
    7080== Affected Providers ==