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§
sourcefn dataset_begin(&mut self, name: Option<&str>) -> Result<()>
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, includingfeature_begin
,properties_begin
,geometry_begin
, and all methods fromGeomProcessor
andPropertyProcessor
sourcefn dataset_end(&mut self) -> Result<()>
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
.
sourcefn feature_begin(&mut self, idx: u64) -> Result<()>
fn feature_begin(&mut self, idx: u64) -> Result<()>
Begin of feature processing
idx
: the positional row index in the dataset. For then
th row,idx
will ben
.feature_begin
will be called before bothproperties_begin
andgeometry_begin
.
sourcefn feature_end(&mut self, idx: u64) -> Result<()>
fn feature_end(&mut self, idx: u64) -> Result<()>
End of feature processing
idx
: the positional row index in the dataset. For then
th row,idx
will ben
.feature_end
will be called after bothproperties_end
andgeometry_end
.
sourcefn properties_begin(&mut self) -> Result<()>
fn properties_begin(&mut self) -> Result<()>
Begin of feature property processing
§Invariants
properties_begin
will not be called a second time beforeproperties_end
is called.
sourcefn properties_end(&mut self) -> Result<()>
fn properties_end(&mut self) -> Result<()>
End of feature property processing
sourcefn geometry_begin(&mut self) -> Result<()>
fn geometry_begin(&mut self) -> Result<()>
Begin of feature geometry processing
§Following events
- Relevant methods from
GeomProcessor
will be called for each geometry.
sourcefn geometry_end(&mut self) -> Result<()>
fn geometry_end(&mut self) -> Result<()>
End of feature geometry processing