t-rex-tileserver / t-rex

t-rex is a vector tile server specialized on publishing MVT tiles from your own data
https://t-rex.tileserver.ch/
MIT License
545 stars 68 forks source link

gdal 3.5 support #294

Closed risicle closed 1 year ago

risicle commented 1 year ago

Attempting to build 0.14.3 against (system) gdal 3.5.2 results in:

No pre-built bindings available for GDAL version 3.5. Use `--features bindgen` to generate your own bindings.

A naive attempt at bumping to the gdal package to 0.13.0 and gdal-sys to 0.7.0 no longer complains but fails to build:

error[E0599]: no method named `name` found for struct `gdal::vector::Layer` in the current scope
   --> t-rex-gdal/src/gdal_ds.rs:49:35
    |
49  |             let name = gdal_layer.name();
    |                                   ^^^^ method not found in `gdal::vector::Layer<'_>`
    |
   ::: /build/t-rex-0.14.3-vendor.tar.gz/gdal/src/vector/layer.rs:278:8
    |
278 |     fn name(&self) -> String {
    |        ---- the method is available for `gdal::vector::Layer<'_>` here
    |
    = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
    |
6   | use gdal::vector::LayerAccess;

...
pka commented 1 year ago

This comes from a breaking change in Rust GDAL 0.13. According to the error message you only have to add use gdal::vector::LayerAccess. If you want to make a PR for a rust-gdal bump, I'm happy the merge.