Trait geozero::FeatureProcessor

source ·
pub trait FeatureProcessor: GeomProcessor + PropertyProcessor {
    // Provided methods
    fn dataset_begin(&mut self, name: Option<&str>) -> Result<()> { ... }
    fn dataset_end(&mut self) -> Result<()> { ... }
    fn feature_begin(&mut self, idx: u64) -> Result<()> { ... }
    fn feature_end(&mut self, idx: u64) -> Result<()> { ... }
    fn properties_begin(&mut self) -> Result<()> { ... }
    fn properties_end(&mut self) -> Result<()> { ... }
    fn geometry_begin(&mut self) -> Result<()> { ... }
    fn geometry_end(&mut self) -> Result<()> { ... }
}
Expand description

Feature processing trait

Provided Methods§

source

fn dataset_begin(&mut self, name: Option<&str>) -> Result<()>

Begin of dataset processing

§Invariants
  • dataset_begin is called only once for an entire dataset.
  • dataset_begin is called before all other methods, including feature_begin, properties_begin, geometry_begin, and all methods from GeomProcessor and PropertyProcessor
source

fn dataset_end(&mut self) -> Result<()>

End of dataset processing

§Invariants
  • dataset_end is called only once for an entire dataset.
  • No other methods may be called after dataset_end.
source

fn feature_begin(&mut self, idx: u64) -> Result<()>

Begin of feature processing

  • idx: the positional row index in the dataset. For the nth row, idx will be n.
  • feature_begin will be called before both properties_begin and geometry_begin.
source

fn feature_end(&mut self, idx: u64) -> Result<()>

End of feature processing

  • idx: the positional row index in the dataset. For the nth row, idx will be n.
  • feature_end will be called after both properties_end and geometry_end.
source

fn properties_begin(&mut self) -> Result<()>

Begin of feature property processing

§Invariants
  • properties_begin will not be called a second time before properties_end is called.
source

fn properties_end(&mut self) -> Result<()>

End of feature property processing

source

fn geometry_begin(&mut self) -> Result<()>

Begin of feature geometry processing

§Following events
  • Relevant methods from GeomProcessor will be called for each geometry.
source

fn geometry_end(&mut self) -> Result<()>

End of feature geometry processing

Implementors§