You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Set version to v0.1.0 in Cargo.toml and update package metadata
* Update note and usage instructions on main README.md
* Add CHANGELOG.md, generated using git-cliff with some manual edits
* Link to github username url for new contributors
* GeoTiff::read returns a TiffResult, not Option
---------
Co-authored-by: Gunnar Schulze <[email protected]>
> This crate is currently undergoing a significant refactoring process to be built on
7
-
> top of the [`tiff`](https://crates.io/crates/tiff) crate, so expect breaking changes
8
-
> as we work towards a v0.1.0 release sometime in 2024 (contributions are welcome!). See
9
-
> the thread at https://github.com/georust/geotiff/issues/7 for more details.
7
+
> This crate has went through a significant refactoring process to be built on top of
8
+
> the [`tiff`](https://crates.io/crates/tiff) crate in 2024/2025, but do expect breaking
9
+
> changes post v0.1.0, as we may decide to do another redesign to work towards
10
+
> asynchronous reading (see thread at https://github.com/georust/geotiff/issues/13).
11
+
> That said, there are still many features to add, so contributions are welcome!
10
12
11
13
## Motivation (pre-2020)
12
14
@@ -23,21 +25,27 @@ You might also consider the [GDAL bindings](https://github.com/georust/gdal) for
23
25
24
26
## Library Usage
25
27
26
-
The library exposes a `TIFF` struct that can be used to open GeoTIFFs and interact with them. Its use is simple:
28
+
The library exposes a `GeoTiff` struct that can be used to open GeoTIFFs and interact with them. Its use is simple:
27
29
28
30
```rust
29
-
TIFF::open("geotiff.tif");
31
+
usegeotiff::GeoTiff;
32
+
33
+
letreader=GeoTiff::read("geotiff.tif")?;
30
34
```
31
35
32
-
`TIFF::open(...)` returns an `Option`, depending if the open operation was successful or not. Individual values can then be read (for the moment, only at pixels) using:
36
+
`GeoTiff::read(...)` returns a `TiffResult<GeoTiff>`, and depending on whether the read
37
+
operation was successful or not, individual values can then be read (for the moment,
38
+
only at pixels) using:
33
39
34
40
```rust
35
-
x.get_value_at(longitude, latitude);
36
-
```
41
+
usegeo_types::Coord;
37
42
38
-
Where `longitude` corresponds to the `image_length` and `latitude` to the `image_width`. This might be a bit counter intuitive, but seems consistent with GDAL (have to look into this).
0 commit comments