Changes between Version 29 and Version 30 of FDORfc59


Ignore:
Timestamp:
Apr 10, 2011, 8:11:58 PM (13 years ago)
Author:
gregboone
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FDORfc59

    v29 v30  
    161161}}}
    162162
    163 
    164163=== Class FdoICircleSegment ===
    165164
     
    645644};
    646645}}}
    647 
    648 [[BR]]
    649646[[BR]]
    650647
     
    751748))
    752749}}}
    753 
    754 [[BR]]
    755750[[BR]]
    756751
     
    848843};
    849844}}}
    850 
    851 [[BR]]
    852845[[BR]]
    853846
     
    1006999}
    10071000}}}
    1008 
    10091001[[BR]]
     1002
     1003== Appendix A: Existing FDO API Curve Segment Classes ==
     1004
     1005The classes described in the following sections currently exist in the FDO Geometry API (Version 3.6.0) and form base and sibling classes to those proposed in the sections above. They are included here for illustrative and comparative purposes.
     1006
     1007=== ICurveSegmentAbstract ===
     1008
     1009{{{
     1010/// \brief
     1011/// The FdoICurveSegmentAbstract class is an abstract geometric Curve Segment object. 
     1012/// This class is used strictly as a component of curves
     1013/// and, thus, does not inherit from IGeometry.
     1014class FdoICurveSegmentAbstract : public FdoIDisposable
     1015{
     1016public:
     1017
     1018    /// \brief
     1019    /// Gets the envelope for the curve segment.
     1020    ///
     1021    /// \return
     1022    /// Returns the envelope
     1023    ///
     1024    FDO_GEOM_API virtual FdoIEnvelope* GetEnvelope() const = 0;
     1025
     1026    /// \brief
     1027    /// Gets the starting position of this curve segment.
     1028    ///
     1029    /// \return
     1030    /// Returns the starting position
     1031    ///
     1032    FDO_GEOM_API virtual FdoIDirectPosition* GetStartPosition() const = 0;
     1033
     1034    /// \brief
     1035    /// Gets the ending position of this curve segment.
     1036    ///
     1037    /// \return
     1038    /// Returns the ending position
     1039    ///
     1040    FDO_GEOM_API virtual FdoIDirectPosition* GetEndPosition() const = 0;
     1041
     1042    /// \brief
     1043    /// Gets the closure state for the curve segment.
     1044    ///
     1045    /// \remarks
     1046    /// The meaning behind this method is not guaranteed
     1047    /// to be uniform between derived types or between implementations
     1048    /// of this package. It may represent a computed value, an explicit
     1049    /// attribute, or be true by definition. As a computed value, the
     1050    /// result is typically from simply testing the starting and
     1051    /// ending positions for exact equality.  This is only reliable in floating
     1052    /// point arithmetic if these data have identical origins.
     1053    /// As an explicit attribute, it would be persisted with the Geometry and
     1054    /// typically denoted by a parameter in the relevant factory method. 
     1055    /// Some Geometry types are closed by definition.
     1056    ///
     1057    /// \return
     1058    /// Returns 'true' if the curve is closed, and false otherwise
     1059    ///
     1060    FDO_GEOM_API virtual bool GetIsClosed() const = 0;
     1061
     1062    /// \brief
     1063    /// Gets the type of the most-derived interface
     1064    /// in the Geometry package for this object
     1065    ///
     1066    /// \return
     1067    /// Returns the derived type
     1068    ///
     1069    FDO_GEOM_API virtual FdoGeometryComponentType GetDerivedType() const = 0;
     1070
     1071    /// \brief
     1072    /// Gets the dimensionality of ordinates in this object.
     1073    ///
     1074    /// \remarks
     1075    /// Values are from the FdoDimensionality enumeration.
     1076    /// A return type of "FdoInt32" is used instead of the enumeration,
     1077    /// catering to typical use with bit masking.
     1078    ///
     1079    /// \return
     1080    /// Returns the ordinate dimensionality
     1081    ///
     1082    FDO_GEOM_API virtual FdoInt32 GetDimensionality() const = 0;
     1083};
     1084}}}
     1085
     1086=== IArcSegmentAbstract ===
     1087
     1088{{{
     1089/// \brief
     1090/// The FdoIArcSegmentAbstract class is an arc curve segment (abstract)
     1091class FdoIArcSegmentAbstract : public FdoICurveSegmentAbstract
     1092{
     1093public:
     1094    /// \brief
     1095    /// Gets some position along the curve, between the starting and ending positions.
     1096    ///
     1097    /// \remarks
     1098    /// Depending on the derived type and its implementation, this may be a
     1099    /// computed value, or a persisted value used as part
     1100    /// of the definition of the curve segment.  This position is the only
     1101    /// means to deduce the curve segment's orientation in some cases, such as
     1102    /// when it is closed or vertically aligned ('on edge' when looking along
     1103    /// the Z axis).
     1104    ///
     1105    /// \return
     1106    /// Returns a midpoint on the curve
     1107    ///
     1108    FDO_GEOM_API virtual FdoIDirectPosition* GetMidPoint() const = 0;
     1109};
     1110}}}
     1111
     1112=== ICircularArcSegment ===
     1113
     1114{{{
     1115/// \brief
     1116/// The FdoICircularArcSegment class is a circular arc curve segment
     1117class FdoICircularArcSegment : public FdoIArcSegmentAbstract
     1118{
     1119protected:
     1120    /// \brief
     1121    /// Default destructor.
     1122    ///
     1123    /// \return
     1124    /// Returns nothing
     1125    ///
     1126    FDO_GEOM_API virtual ~FdoICircularArcSegment() {};
     1127};
     1128}}}
     1129
     1130=== ILineStringSegment ===
     1131
     1132{{{
     1133/// \brief
     1134/// The FdoILineStringSegment class is a LineString curve segment type. 
     1135/// The shape of FdoILineStringSegment is the set of positions defined
     1136/// by the contained collection, plus linear interpolation between
     1137/// consecutive points. This is a helper type for Geometries in the
     1138/// Geometry package.
     1139///
     1140/// \remarks
     1141/// It does not derive from IGeometry.
     1142///
     1143class FdoILineStringSegment : public FdoICurveSegmentAbstract
     1144{
     1145public:
     1146    /// \brief
     1147    /// Gets the number of positions in this object.
     1148    ///
     1149    /// \return
     1150    /// Returns the number of positions
     1151    ///
     1152    FDO_GEOM_API virtual FdoInt32 GetCount() const = 0;
     1153
     1154    /// \brief
     1155    /// Gets the position at the specified (zero-based) index.
     1156    ///
     1157    /// \return
     1158    /// Returns the position
     1159    ///
     1160    FDO_GEOM_API virtual FdoIDirectPosition* GetItem(FdoInt32 index) const = 0;
     1161
     1162    /// \brief
     1163    /// Gets a collection of all of the positions in this object.
     1164    ///
     1165    /// \return
     1166    /// Returns the positions
     1167    ///
     1168    FDO_GEOM_API virtual FdoDirectPositionCollection* GetPositions() = 0;
     1169
     1170    /// \brief
     1171    /// Gets the ordinates as an array.
     1172    ///
     1173    /// \remarks
     1174    /// The caller must not free the returned array.
     1175    /// The ordinates are in the order XYZMXYZM..., with only those present
     1176    /// according to the dimensionality.
     1177    ///
     1178    /// \return
     1179    /// Returns the ordinates
     1180    ///
     1181    FDO_GEOM_API virtual const double * GetOrdinates() = 0;
     1182};
     1183}}}
    10101184[[BR]]
    1011 
    1012 == OGC WKT vs FGF WKT ==
     1185
     1186== Appendix B: Questions and Answers ==
     1187
     1188=== ICircleSegment vs. ICircle ===
     1189
     1190==== Question: ====
     1191
     1192What if we change the proposal to derive FdoICircleSegment directly from FdoICurveAbstract, in the process renaming FdoICircleSegment to be FdoICircle.  To me, this has some merit, since as currently described, a circle must be closed and cannot be combined with any other !ArcSegment Types to form complex curve strings. They can only stand alone, and wrapping it in a !CurveString seems wasteful. If a user wished to define a non-closed circle, they would use ICircularArcSegment. 
     1193
     1194==== Response: ====
     1195
     1196The FdoICircle may be something of a hard sell. In OGC, Circle extends Arc, which extends !ArcString, which extends !CurveSegment, which implements !GenericCurve.
     1197
     1198=== Can ICircularArcSegment Describe a Closed Circle ===
     1199
     1200==== Question: ====
     1201
     1202I’m not sure how !CircularArcSegment can describe a full circle. If the start and end points are identical, then you only have two points (start/end and mid-point), which does not define the plane of the arc for XYZ dimensionality.
     1203
     1204==== Response: ====
     1205
     1206For the rest of this explanation, it’s assumed that the circle is complete (start and end are same position).
     1207
     1208Take the line that is formed by the start and mid positions.  The normal to that line in the XY plane forms another line through the circle to orient it.  The circle is treated as if you simply tilted it out of the XY plane by grabbing the mid position.
     1209
     1210There is a position of ambiguity:  if the circle is standing perfectly on edge so that the start and mid positions coincide in XY (but have different Z).
     1211
     1212This (using an FDO circle in 3D) works for round-tripping and a few special functions such as tessellation.  However, there are several weak points in GIS applications that assume circular arcs to be in the XY plane.  These should be addressed by the time that they add support for more geometry types, assuming that 3D support will be required for all of them.
     1213[[BR]]
     1214
     1215== Appendix C: OGC WKT vs FGF WKT ==
    10131216
    10141217The following analysis is based on the examination of the OGC WKB format vs. the As-Implemented FGF WKB format in FDO 3.5.0. The most recent OGC WKB Specification can be located at the following link. Refer to Section 7 on Page 53: “Well-known Text Representation for Geometry”.
     
    10331236||XYM||M||
    10341237||XYZM||ZM||
    1035 
    10361238[[BR]]
    1037 [[BR]]
    1038 
    1039 == OGC WKB vs FGF WKB ==
     1239
     1240== Appendix D: OGC WKB vs FGF WKB ==
    10401241
    10411242The following analysis is based on the examination of the OGC WKB format vs. the As-Implemented FGF WKB format in FDO 3.5.0. The most recent OGC WKB Specification can be located at the following link. Refer to Section 8 on Page 63: “Well-known Binary Representation for Geometry”.
     
    10991300||!PolyhedralSurface||15||
    11001301||TIN||16||
    1101 
    11021302[[BR]]
    11031303
     
    11611361||TIN ZM||3016||
    11621362[[BR]]
    1163 
    1164 == Appendix A: Existing FDO API Curve Segment Classes ==
    1165 
    1166 The classes described in the following sections currently exist in the FDO Geometry API (Version 3.6.0) and form base and sibling classes to those proposed in the sections above. They are included here for illustrative and comparative purposes.
    1167 
    1168 === ICurveSegmentAbstract ===
    1169 
    1170 {{{
    1171 /// \brief
    1172 /// The FdoICurveSegmentAbstract class is an abstract geometric Curve Segment object. 
    1173 /// This class is used strictly as a component of curves
    1174 /// and, thus, does not inherit from IGeometry.
    1175 class FdoICurveSegmentAbstract : public FdoIDisposable
    1176 {
    1177 public:
    1178 
    1179     /// \brief
    1180     /// Gets the envelope for the curve segment.
    1181     ///
    1182     /// \return
    1183     /// Returns the envelope
    1184     ///
    1185     FDO_GEOM_API virtual FdoIEnvelope* GetEnvelope() const = 0;
    1186 
    1187     /// \brief
    1188     /// Gets the starting position of this curve segment.
    1189     ///
    1190     /// \return
    1191     /// Returns the starting position
    1192     ///
    1193     FDO_GEOM_API virtual FdoIDirectPosition* GetStartPosition() const = 0;
    1194 
    1195     /// \brief
    1196     /// Gets the ending position of this curve segment.
    1197     ///
    1198     /// \return
    1199     /// Returns the ending position
    1200     ///
    1201     FDO_GEOM_API virtual FdoIDirectPosition* GetEndPosition() const = 0;
    1202 
    1203     /// \brief
    1204     /// Gets the closure state for the curve segment.
    1205     ///
    1206     /// \remarks
    1207     /// The meaning behind this method is not guaranteed
    1208     /// to be uniform between derived types or between implementations
    1209     /// of this package. It may represent a computed value, an explicit
    1210     /// attribute, or be true by definition. As a computed value, the
    1211     /// result is typically from simply testing the starting and
    1212     /// ending positions for exact equality.  This is only reliable in floating
    1213     /// point arithmetic if these data have identical origins.
    1214     /// As an explicit attribute, it would be persisted with the Geometry and
    1215     /// typically denoted by a parameter in the relevant factory method. 
    1216     /// Some Geometry types are closed by definition.
    1217     ///
    1218     /// \return
    1219     /// Returns 'true' if the curve is closed, and false otherwise
    1220     ///
    1221     FDO_GEOM_API virtual bool GetIsClosed() const = 0;
    1222 
    1223     /// \brief
    1224     /// Gets the type of the most-derived interface
    1225     /// in the Geometry package for this object
    1226     ///
    1227     /// \return
    1228     /// Returns the derived type
    1229     ///
    1230     FDO_GEOM_API virtual FdoGeometryComponentType GetDerivedType() const = 0;
    1231 
    1232     /// \brief
    1233     /// Gets the dimensionality of ordinates in this object.
    1234     ///
    1235     /// \remarks
    1236     /// Values are from the FdoDimensionality enumeration.
    1237     /// A return type of "FdoInt32" is used instead of the enumeration,
    1238     /// catering to typical use with bit masking.
    1239     ///
    1240     /// \return
    1241     /// Returns the ordinate dimensionality
    1242     ///
    1243     FDO_GEOM_API virtual FdoInt32 GetDimensionality() const = 0;
    1244 };
    1245 }}}
    1246 
    1247 === IArcSegmentAbstract ===
    1248 
    1249 {{{
    1250 /// \brief
    1251 /// The FdoIArcSegmentAbstract class is an arc curve segment (abstract)
    1252 class FdoIArcSegmentAbstract : public FdoICurveSegmentAbstract
    1253 {
    1254 public:
    1255     /// \brief
    1256     /// Gets some position along the curve, between the starting and ending positions.
    1257     ///
    1258     /// \remarks
    1259     /// Depending on the derived type and its implementation, this may be a
    1260     /// computed value, or a persisted value used as part
    1261     /// of the definition of the curve segment.  This position is the only
    1262     /// means to deduce the curve segment's orientation in some cases, such as
    1263     /// when it is closed or vertically aligned ('on edge' when looking along
    1264     /// the Z axis).
    1265     ///
    1266     /// \return
    1267     /// Returns a midpoint on the curve
    1268     ///
    1269     FDO_GEOM_API virtual FdoIDirectPosition* GetMidPoint() const = 0;
    1270 };
    1271 }}}
    1272 
    1273 === ICircularArcSegment ===
    1274 
    1275 {{{
    1276 /// \brief
    1277 /// The FdoICircularArcSegment class is a circular arc curve segment
    1278 class FdoICircularArcSegment : public FdoIArcSegmentAbstract
    1279 {
    1280 protected:
    1281     /// \brief
    1282     /// Default destructor.
    1283     ///
    1284     /// \return
    1285     /// Returns nothing
    1286     ///
    1287     FDO_GEOM_API virtual ~FdoICircularArcSegment() {};
    1288 };
    1289 }}}
    1290 
    1291 === ILineStringSegment ===
    1292 
    1293 {{{
    1294 /// \brief
    1295 /// The FdoILineStringSegment class is a LineString curve segment type. 
    1296 /// The shape of FdoILineStringSegment is the set of positions defined
    1297 /// by the contained collection, plus linear interpolation between
    1298 /// consecutive points. This is a helper type for Geometries in the
    1299 /// Geometry package.
    1300 ///
    1301 /// \remarks
    1302 /// It does not derive from IGeometry.
    1303 ///
    1304 class FdoILineStringSegment : public FdoICurveSegmentAbstract
    1305 {
    1306 public:
    1307     /// \brief
    1308     /// Gets the number of positions in this object.
    1309     ///
    1310     /// \return
    1311     /// Returns the number of positions
    1312     ///
    1313     FDO_GEOM_API virtual FdoInt32 GetCount() const = 0;
    1314 
    1315     /// \brief
    1316     /// Gets the position at the specified (zero-based) index.
    1317     ///
    1318     /// \return
    1319     /// Returns the position
    1320     ///
    1321     FDO_GEOM_API virtual FdoIDirectPosition* GetItem(FdoInt32 index) const = 0;
    1322 
    1323     /// \brief
    1324     /// Gets a collection of all of the positions in this object.
    1325     ///
    1326     /// \return
    1327     /// Returns the positions
    1328     ///
    1329     FDO_GEOM_API virtual FdoDirectPositionCollection* GetPositions() = 0;
    1330 
    1331     /// \brief
    1332     /// Gets the ordinates as an array.
    1333     ///
    1334     /// \remarks
    1335     /// The caller must not free the returned array.
    1336     /// The ordinates are in the order XYZMXYZM..., with only those present
    1337     /// according to the dimensionality.
    1338     ///
    1339     /// \return
    1340     /// Returns the ordinates
    1341     ///
    1342     FDO_GEOM_API virtual const double * GetOrdinates() = 0;
    1343 };
    1344 }}}
    1345 
    1346 [[BR]]
    1347 [[BR]]
    1348 
    1349 == Appendix B: Questions and Answers ==
    1350 
    1351 === ICircleSegment vs. ICircle ===
    1352 
    1353 ==== Question: ====
    1354 
    1355 What if we change the proposal to derive FdoICircleSegment directly from FdoICurveAbstract, in the process renaming FdoICircleSegment to be FdoICircle.  To me, this has some merit, since as currently described, a circle must be closed and cannot be combined with any other !ArcSegment Types to form complex curve strings. They can only stand alone, and wrapping it in a !CurveString seems wasteful. If a user wished to define a non-closed circle, they would use ICircularArcSegment. 
    1356 
    1357 ==== Response: ====
    1358 
    1359 The FdoICircle may be something of a hard sell. In OGC, Circle extends Arc, which extends !ArcString, which extends !CurveSegment, which implements !GenericCurve.
    1360 
    1361 === Can ICircularArcSegment Describe a Closed Circle ===
    1362 
    1363 ==== Question: ====
    1364 
    1365 I’m not sure how !CircularArcSegment can describe a full circle. If the start and end points are identical, then you only have two points (start/end and mid-point), which does not define the plane of the arc for XYZ dimensionality.
    1366 
    1367 ==== Response: ====
    1368 
    1369 For the rest of this explanation, it’s assumed that the circle is complete (start and end are same position).
    1370 
    1371 Take the line that is formed by the start and mid positions.  The normal to that line in the XY plane forms another line through the circle to orient it.  The circle is treated as if you simply tilted it out of the XY plane by grabbing the mid position.
    1372 
    1373 There is a position of ambiguity:  if the circle is standing perfectly on edge so that the start and mid positions coincide in XY (but have different Z).
    1374 
    1375 This (using an FDO circle in 3D) works for round-tripping and a few special functions such as tessellation.  However, there are several weak points in GIS applications that assume circular arcs to be in the XY plane.  These should be addressed by the time that they add support for more geometry types, assuming that 3D support will be required for all of them.
    1376 
    1377 [[BR]]
    1378 [[BR]]
    13791363
    13801364== Implications ==