Section 4.7 Examples of CSN and OSN


The examples concern geographic objects belonging to three classes: StreamSection, ForestStand, and Swamp. These classes are assumed part of a schema designated as MS (my schema).

< GeographicObject

     subclass:       ForestStand::MS

     attributes:     majorSpecies     String(20)
                     minorSpecies     String(20)

     restricted:     position.geometry:Polygon

     comments:       "This is a simple definition suitable as an example."
> 

< GeographicObject
     subclass:       StreamSection::MS

     attributes:     substrate        Composition::MS
                     bankFullWidth    Real32

     restricted:     position.geometry:ArcDirected

     comments:       "bankFullWidth is in metres."
> 

< GeographicObject
     subclass:       Swamp::MS

     restricted:     position.geometry:Polygon

     comments:       "Typically a user defined class includes new attributes,
                      but there is no requirement that new attributes be 
                      supplied."
> 

< Enumeration
     subclass:       Composition::MS

     values:         gravelly sandy fineGrained

     comments:       "Three options for the composition of the bottom of a
                     stream are available."
> 


// Here is the OSN for a stream section. Assume that the stream is // represented by a single arc and that it was digitized in a downstream // direction (from North to South for the purposes // of the example). Here and throughout these examples, all arcs are // treated as straight lines between specified points. StreamSection::MS ( position: SpatialObject ( geometry: ArcDirected ( pointList: List { Point ( position: CoordXYZ ( x: 497560 y: 5431050 z: 132 ) ) Point ( position: CoordXYZ ( x: 497575 y: 5431042 z: 123 ) ) Point ( position: CoordXYZ ( x: 497561 y: 5431034 z: 115 ) ) Point ( position: CoordXYZ ( x: 497578 y: 5431028 z: 102 ) ) } ) flowDirection: forward ) substrate: gravelly bankFullWidth: 7.3 ) // If the stream positional data are provided in a downstream direction, then flowDirection need not be given, as // its default value is forward. Next is the OSN for the same stream section, but this time an object identifier is //used and flowDirection is not stated. Also, this time spatial referencing is provided. ArcDirected ( objectIdentifier: *13 pointList: List { Point ( position: CoordXYZ ( x: 497560 y: 5431050 z: 132 ) ) Point ( position: CoordXYZ ( x: 497575 y: 5431042 z: 123 ) ) Point ( position: CoordXYZ ( x: 497561 y: 5431034 z: 115 ) ) Point ( position: CoordXYZ ( x: 497578 y: 5431028 z: 102 ) } ) ) SpatialReferencing ( objectIdentifier: *7 coordSystem: CoordinateSystem ( horizontal: UTM ( zone: 10 hemisphere: north ) ) geodeticReference: GeodeticReferenceSystem ( horizontal: HorizontalReference ( adjustment: nad83 ) vertical: VerticalReference ( adjustment: navd88 ) ) ) StreamSection::MS ( position: SpatialObject ( geometry: *13 spatialReferencing: *7 ) substrate: gravelly bankFullWidth: 7.3 ) // Next we introduce two forest stands, one on the left of the stream and the other on the right of the stream. // The forest stand on the left is defined first. We'll assume that two other arcs have been defined, with object // identifiers (sometimes referred to as oids) specified as *48 and *49. For the moment, ignore the inner // boundary of the area on the left. // Notice that this time oriented arcs are used. Both oriented arcs and oriented paths include a traversal direction, // which by default is assumed to be forward unless otherwise stated. In Figure 4.2 the arrows indicate the // direction of compilation of the points for each arc. For the stand on the left, the three arcs were all captured // such that the area of interest is on the right. SAIF dictates that the arcs on the boundary of a polygon must be // traversed in a right hand fashion; thus, there is no need to change the traversal direction for these arcs when // specifying the forest stand on the left. ForestStand::MS ( position: SpatialObject ( geometry: Polygon ( boundary: OrientedPath ( path: Ring ( arcList: List { OrientedArc ( arc: *48 ) OrientedArc ( arc: *13 ) OrientedArc ( arc: *49 ) } ) ) ) spatialReferencing: *7 ) majorSpecies: Douglas Fir minorSpecies: Grand Fir ) // Now we'll look at the forest stand on the right. Assume that an arc with object identifier *50 has been // previously specified. Note that the traversal direction of the arc with an object identifier of *13 is now in the // opposite direction. ForestStand::MS ( position: SpatialObject ( geometry: Polygon ( boundary: OrientedPath ( path: Ring ( arcList: List { OrientedArc ( arc: *13 traversalDirection: backward ) OrientedArc ( arc: *50 ) } ) ) ) spatialReferencing: *7 ) majorSpecies: Grand Fir minorSpecies: Douglas Fir ) // We'll continue the example by assuming that the forest stand on the left has a hole in the middle of it, // occupied by a swamp. We'll also assign object identifiers to the forest stands and the swamp. Another arc, // with an object identifier equal to *51, is an inner boundary of the forest stand on the left and the (outer) // boundary of the swamp. // First we redefine the forest stand on the left. ForestStand::MS ( objectIdentifier: *1 position: SpatialObject ( geometry: PolygonComplex ( boundary: OrientedPath ( path: Ring ( arcList: List { OrientedArc ( arc: *48 ) OrientedArc ( arc: *13 ) OrientedArc ( arc: *49 ) } ) ) innerBoundaries: Set ( OrientedPath: ( path: Ring ( arcList: List { OrientedArc ( arc: *51 traversalDirection: backward ) } ) ) ) ) spatialReferencing: *7 ) majorSpecies: Douglas Fir minorSpecies: Grand Fir ) Swamp::MS ( objectIdentifier: *3 position: SpatialObject ( geometry: Polygon ( boundary: OrientedPath ( path: Ring ( arcList: List { OrientedArc ( arc: *51 ) } ) ) ) spatialReferencing: *7 ) ) // In the cases described above, sharing of arcs is demonstrated. It is also practical to share the rings, which may // at times be more efficient. Examining the stand on the left and the swamp, two oriented paths can be defined, // each with an object identifier. Ring ( objectIdentifier: *76 arcList: List { OrientedArc ( arc: *48 ) OrientedArc ( arc: *13 ) OrientedArc ( arc: *49 ) } ) Ring ( objectIdentifier: *78 arcList: List { OrientedArc ( arc: *51 ) } ) ForestStand::MS ( objectIdentifier: *1 position: SpatialObject ( geometry: PolygonComplex ( boundary: OrientedPath ( path: *76 ) innerBoundaries: Set { OrientedPath ( path: *78 traversalDirection: backward ) } ) spatialReferencing: *7 ) majorSpecies: Douglas Fir minorSpecies: Grand Fir ) Swamp::MS ( objectIdentifier: *3 position: SpatialObject ( geometry: Polygon ( boundary: OrientedPath ( path: *78 ) ) spatialReferencing: *7 ) ) // As demonstrated above, there are several ways of representing the same data. Making use of extensive // referencing and sharing, as in the last examples, has two advantages: brevity and more explicit information. // This must be balanced against the overhead of tracking references.

Links to the SAIF 3.1 Specification document and the complete SAIF class list