Skip to content

Commit

Permalink
docs: fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
louisgreiner authored and Tristramg committed Jun 29, 2024
1 parent fca3686 commit b8e7c77
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 31 deletions.
32 changes: 15 additions & 17 deletions schema/lrs.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@ enum GeometryType : byte { Geographic = 1, Schematic = 2 }
table Lrs {
properties:[Property];

/// In the network topology is defined are segments connected by nodes.
/// In the network topology, segments are connected by nodes.
segments:[Segment];
/// In the network topology, a node is the end of a segment and usually the intersection of multiple segments
/// In the network topology, a node is the end of a segment and usually the intersection of multiple segments.
nodes:[Node];
/// Each network has traversals, which can be thought of as roads, railway lines, tracks, paths or trips.
traversals:[Traversal];

anchors:[Anchor];
linear_referencing_methods:[LinearReferencingMethod];

/// Wether the geometry is projected or geographic
/// Computation of distances and length will be influenced accordingly
/// Whether the geometry is geographic or projected.
/// Computation of distances and length will be influenced accordingly.
geometry_type:GeometryType = Geographic;
}

/// A continuous link between two network nodes. Segments can be located in space.
/// It could be a section of roads between intersections, a piece of railway tracks without switches, a continuous piece of sewer pipe.
/// Segments are directed: one of its ends of the segments is its begining, and the other its ends.
/// Segments are directed: one of its ends is its begining, and the other one its end.
table Segment {
id:string (required);
properties:[Property];
Expand Down Expand Up @@ -60,9 +60,7 @@ table Traversal {
segments:[SegmentOfTraversal] (required);
}

// LRM DEFINITION

/// Anchors are reference locations, used for positioning within a linear referencing method.
/// Anchors are reference locations, used for positioning within a Linear Referencing Method.
/// There are two types of anchors:
/// * most anchors are standalone reference locations, such as milestones or kilometer markers
/// * some anchors are associated with a network node. The location of the anchor is deduced from the location of the node.
Expand All @@ -71,37 +69,37 @@ table Anchor {
properties:[Property];

/// Most anchors have a name, which is used to reference the location.
/// More often than not a kilometer or mile number, but it can also be a letter or word.
/// It can often be a kilometer or mile number, but it can also be a letter or word.
name:string;
/// Anchors can be bound to a node, or defined independently.
/// If the anchor is bound to a node, it's location is deduced from location of the node.
/// If the anchor is bound to a node, its location is deduced from location of the node.
node:uint32;
/// The Anchor can also be defined by a geographical position
/// The anchor can also be defined by a geographical position.
geometry: Point;
}

enum DistanceUnit : byte { Meters, MilliMeters }

/// Linear referencing methods (LRMs) are curves in space, along which distances can be measured.
/// Linear Referencing Methods (LRMs) are curves in space, along which distances can be measured.
/// Each linear referencing method has:
/// * a network traversal, which defines the path of the curve
/// * a sequence of anchors, which are projected on the curve, and used as positioning reference points
/// * distances between anchors have to be defined: even though distances can be measured on the curve,
// it can be imprecise enough to joepardize correct ordering of object positionned relative to different reference points
// it can be imprecise enough to joepardize correct ordering of object positioned relative to different reference points.
table LinearReferencingMethod {
id:string (required);
properties:[Property];

traversal_index:uint32;
/// An LRM can apply to multiple traversal
/// For instance a LRM can be the central line of a highway
/// And that LRM is the reference for the two other traversals corresponding to each direction
/// An LRM can apply to multiple traversal.
/// For instance, a LRM can be the central line of a highway.
/// And that LRM is the reference for the two other traversals corresponding to each direction.
used_on:[uint32];
anchor_indices:[uint64] (required);
distances:[double] (required);
/// The unit used to measure the distance between anchors
distance_unit:DistanceUnit = Meters;
/// The unit used to express measures relative to anchors (12+230)
/// The unit used to express measures relative to anchors (12+230).
measure_unit:DistanceUnit = Meters;
}

Expand Down
28 changes: 14 additions & 14 deletions src/lrs_generated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -693,15 +693,15 @@ impl<'a> Lrs<'a> {
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Property>>>>(Lrs::VT_PROPERTIES, None)}
}
/// In the network topology is defined are segments connected by nodes.
/// In the network topology, segments are connected by nodes.
#[inline]
pub fn segments(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Segment<'a>>>> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Segment>>>>(Lrs::VT_SEGMENTS, None)}
}
/// In the network topology, a node is the end of a segment and usually the intersection of multiple segments
/// In the network topology, a node is the end of a segment and usually the intersection of multiple segments.
#[inline]
pub fn nodes(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Node<'a>>>> {
// Safety:
Expand Down Expand Up @@ -731,8 +731,8 @@ impl<'a> Lrs<'a> {
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<LinearReferencingMethod>>>>(Lrs::VT_LINEAR_REFERENCING_METHODS, None)}
}
/// Wether the geometry is projected or geographic
/// Computation of distances and length will be influenced accordingly
/// Whether the geometry is geographic or projected.
/// Computation of distances and length will be influenced accordingly.
#[inline]
pub fn geometry_type(&self) -> GeometryType {
// Safety:
Expand Down Expand Up @@ -850,7 +850,7 @@ pub enum SegmentOffset {}

/// A continuous link between two network nodes. Segments can be located in space.
/// It could be a section of roads between intersections, a piece of railway tracks without switches, a continuous piece of sewer pipe.
/// Segments are directed: one of its ends of the segments is its begining, and the other its ends.
/// Segments are directed: one of its ends is its begining, and the other one its end.
pub struct Segment<'a> {
pub _tab: flatbuffers::Table<'a>,
}
Expand Down Expand Up @@ -1269,7 +1269,7 @@ impl core::fmt::Debug for Traversal<'_> {
pub enum AnchorOffset {}
#[derive(Copy, Clone, PartialEq)]

/// Anchors are reference locations, used for positioning within a linear referencing method.
/// Anchors are reference locations, used for positioning within a Linear Referencing Method.
/// There are two types of anchors:
/// * most anchors are standalone reference locations, such as milestones or kilometer markers
/// * some anchors are associated with a network node. The location of the anchor is deduced from the location of the node.
Expand Down Expand Up @@ -1326,7 +1326,7 @@ impl<'a> Anchor<'a> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Property>>>>(Anchor::VT_PROPERTIES, None)}
}
/// Most anchors have a name, which is used to reference the location.
/// More often than not a kilometer or mile number, but it can also be a letter or word.
/// It can often be a kilometer or mile number, but it can also be a letter or word.
#[inline]
pub fn name(&self) -> Option<&'a str> {
// Safety:
Expand All @@ -1335,15 +1335,15 @@ impl<'a> Anchor<'a> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Anchor::VT_NAME, None)}
}
/// Anchors can be bound to a node, or defined independently.
/// If the anchor is bound to a node, it's location is deduced from location of the node.
/// If the anchor is bound to a node, its location is deduced from location of the node.
#[inline]
pub fn node(&self) -> u32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<u32>(Anchor::VT_NODE, Some(0)).unwrap()}
}
/// The Anchor can also be defined by a geographical position
/// The anchor can also be defined by a geographical position.
#[inline]
pub fn geometry(&self) -> Option<&'a Point> {
// Safety:
Expand Down Expand Up @@ -1444,7 +1444,7 @@ impl core::fmt::Debug for Anchor<'_> {
pub enum LinearReferencingMethodOffset {}
#[derive(Copy, Clone, PartialEq)]

/// Linear referencing methods (LRMs) are curves in space, along which distances can be measured.
/// Linear Referencing Methods (LRMs) are curves in space, along which distances can be measured.
/// Each linear referencing method has:
/// * a network traversal, which defines the path of the curve
/// * a sequence of anchors, which are projected on the curve, and used as positioning reference points
Expand Down Expand Up @@ -1514,9 +1514,9 @@ impl<'a> LinearReferencingMethod<'a> {
// which contains a valid value in this slot
unsafe { self._tab.get::<u32>(LinearReferencingMethod::VT_TRAVERSAL_INDEX, Some(0)).unwrap()}
}
/// An LRM can apply to multiple traversal
/// For instance a LRM can be the central line of a highway
/// And that LRM is the reference for the two other traversals corresponding to each direction
/// An LRM can apply to multiple traversal.
/// For instance, a LRM can be the central line of a highway.
/// And that LRM is the reference for the two other traversals corresponding to each direction.
#[inline]
pub fn used_on(&self) -> Option<flatbuffers::Vector<'a, u32>> {
// Safety:
Expand Down Expand Up @@ -1546,7 +1546,7 @@ impl<'a> LinearReferencingMethod<'a> {
// which contains a valid value in this slot
unsafe { self._tab.get::<DistanceUnit>(LinearReferencingMethod::VT_DISTANCE_UNIT, Some(DistanceUnit::Meters)).unwrap()}
}
/// The unit used to express measures relative to anchors (12+230)
/// The unit used to express measures relative to anchors (12+230).
#[inline]
pub fn measure_unit(&self) -> DistanceUnit {
// Safety:
Expand Down

0 comments on commit b8e7c77

Please sign in to comment.