Stuck with GeoZero/Flatgeobuf: trait not satifsied when calling a method

I've added flatgeobuf to my project, and iterating over features and reading geometries worked fine. But now I try to read a field, called "x" (it's the X coordinate of the tile the object is in), and it's giving me an error.

// [dependencies]
// geozero = "0.9"
// flatgeobuf = "3.24.0"

// #2 and #3 are traits that are required to be in scope
use flatgeobuf::{FgbReader, FallibleStreamingIterator, FeatureProperties};
use std::{

fn read_sources() -> Result<(), Box<dyn Error>> {
	let sources_path = "sources.fgb";
	let mut file = BufReader::new(File::open(sources_path)?);
	let mut sources = FgbReader::open(&mut file)?.select_all()?;

	while let Some(item) = {
		let g = item.geometry().unwrap().xy().unwrap();
		let x ="x")?;
		let y ="y")?;
		//println!("{} {} {:?}", x, y, g);  // won't work anyway


This fails to compile at

error[E0277]: the trait bound `(): geozero::property_processor::PropertyReadType` is not satisfied
   --> src/
127 |         let x ="x")?;
    |                      ^^^^^^^^ the trait `geozero::property_processor::PropertyReadType` is not implemented for `()`
note: required by a bound in `property`
   --> /home/culebron/.cargo/registry/src/
67  |     fn property<T: PropertyReadType>(&self, name: &str) -> Result<T> {
    |                    ^^^^^^^^^^^^^^^^ required by this bound in `property`

I tried importing these traits, but it made no difference.

Is this fatal? (like I can't use the crate because it won't compile anyway?)

P.S.: I saw that versions in flatgeobuf are weird: 0.7, 0.8, then immediately 3.24.0. So I switched version to 0.8.0, but the error was exactly the same.

Found the trick here: you must tell it the type of the field.

let x =<i64>("x")?;
let y =<i64>("y")?;

Read the error messages carefully they said...

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.