pub struct FgbReader<'a, R, State = Initial> { /* private fields */ }
Expand description

FlatGeobuf dataset reader

Implementations

Open dataset by reading the header information

Open dataset by reading the header information without FlatBuffers verification

Select all features without using seek.

Select features within a bounding box without using seek.

Select all features.

Select features within a bounding box.

Header information

Number of selected features (None for undefined feature count)

Return current feature

Read and process all selected features

Return current feature

Read and process all selected features

Trait Implementations

FallibleStreamingIterator differs from the standard library’s Iterator in two ways:

  • each call to next can fail.
  • returned FgbFeature is valid until next is called again or FgbReader is reset or finalized.

While these iterators cannot be used with Rust for loops, while let loops offer a similar level of ergonomics:

use flatgeobuf::*;

while let Some(feature) = fgb.next()? {
    let props = feature.properties()?;
    println!("{}", props["name"]);
}

The error type of iteration.

The type being iterated over.

Advances the iterator to the next position. Read more

Returns the current element. Read more

Returns bounds on the number of remaining elements in the iterator.

Advances the iterator, returning the next element. Read more

Determines if all elements of the iterator satisfy a predicate.

Determines if any elements of the iterator satisfy a predicate.

Borrows an iterator, rather than consuming it. Read more

Returns the number of remaining elements in the iterator.

Returns an iterator which filters elements by a predicate.

Returns the first element of the iterator which satisfies a predicate.

Calls a closure on each element of an iterator.

Returns an iterator which is well-behaved at the beginning and end of iteration.

Returns an iterator which applies a transform to elements.

Returns an iterator which applies a transform to elements. Read more

Returns an iterator that applies a transform to errors.

Returns the nth element of the iterator.

Returns the position of the first element matching a predicate.

Returns an iterator which skips the first n elements.

Returns an iterator which skips the first sequence of elements matching a predicate.

Returns an iterator which only returns the first n elements.

Returns an iterator which only returns the first sequence of elements matching a predicate.

FallibleStreamingIterator differs from the standard library’s Iterator in two ways:

  • each call to next can fail.
  • returned FgbFeature is valid until next is called again or FgbReader is reset or finalized.

While these iterators cannot be used with Rust for loops, while let loops offer a similar level of ergonomics:

use flatgeobuf::*;

while let Some(feature) = fgb.next()? {
    let props = feature.properties()?;
    println!("{}", props["name"]);
}

The error type of iteration.

The type being iterated over.

Advances the iterator to the next position. Read more

Returns the current element. Read more

Returns bounds on the number of remaining elements in the iterator.

Advances the iterator, returning the next element. Read more

Determines if all elements of the iterator satisfy a predicate.

Determines if any elements of the iterator satisfy a predicate.

Borrows an iterator, rather than consuming it. Read more

Returns the number of remaining elements in the iterator.

Returns an iterator which filters elements by a predicate.

Returns the first element of the iterator which satisfies a predicate.

Calls a closure on each element of an iterator.

Returns an iterator which is well-behaved at the beginning and end of iteration.

Returns an iterator which applies a transform to elements.

Returns an iterator which applies a transform to elements. Read more

Returns an iterator that applies a transform to errors.

Returns the nth element of the iterator.

Returns the position of the first element matching a predicate.

Returns an iterator which skips the first n elements.

Returns an iterator which skips the first sequence of elements matching a predicate.

Returns an iterator which only returns the first n elements.

Returns an iterator which only returns the first sequence of elements matching a predicate.

Consume and process all selected features.

Consume and process geometries of all selected features.

Consume and process all selected features.

Consume and process geometries of all selected features.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Consume features as GeoJSON String.

Consume features as SVG String.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more