georust / gdal

Rust bindings for GDAL
https://crates.io/crates/gdal
MIT License
339 stars 92 forks source link

`Polygonize` wrapper #533

Open Libbum opened 2 months ago

Libbum commented 2 months ago

Hi all, I'm looking to be able to access Polygonize. Reading through the only issue that references it (#306), I'll probably need to head down to gdal-sys to write a wrapper—something I've not done in quite a while and never in this project.

Can someone give me some pointers on how I should begin with this, an example that is similar perhaps?

lnicola commented 2 months ago

https://github.com/georust/gdal/pull/456 might serve as an example. It went back and forth a lot because of my nit-picking regarding the API. But GDALFPolygonize is simpler, because the DEM routines were actually a thin wrapper over the gdaldem implementation, taking command line arguments and so on. For some reason, GDALFPolygonize isn't like that, and I don't see a higher-level version.

And I don't think we support progress callbacks at this point.

Libbum commented 2 months ago

Thanks. Either method can work, I'll take a dive into 456 then!

lnicola commented 2 months ago

468 is a simpler example, but not exactly the same thing.