Skip to content

Commit 5cb67e7

Browse files
weiji14gschulze
andauthored
Release v0.1.0 (#29)
* 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]>
1 parent 9ccfe90 commit 5cb67e7

File tree

4 files changed

+190
-14
lines changed

4 files changed

+190
-14
lines changed

CHANGELOG.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [0.1.0] - 2025-06-01
8+
9+
### <!-- 0 --> 🏗️ Breaking changes
10+
- Migrate to tiff crate by @gschulze in [#17](https://github.com/georust/geotiff/pull/17)
11+
12+
### <!-- 1 --> 🚀 Features
13+
- Coordinate Transformations by @gschulze in [#21](https://github.com/georust/geotiff/pull/21)
14+
- Support for reading GeoKeyDirectory by @gschulze in [#19](https://github.com/georust/geotiff/pull/19)
15+
16+
### <!-- 3 --> 🏭 Refactor
17+
- Use tiff Tag enum from tiff crate by @weiji14 in [#14](https://github.com/georust/geotiff/pull/14)
18+
- Use tiff tag types from tiff crate by @weiji14 in [#11](https://github.com/georust/geotiff/pull/11)
19+
20+
### <!-- 4 --> 📝 Documentation
21+
- Update description and badge in main README.md by @weiji14 in [#18](https://github.com/georust/geotiff/pull/18)
22+
23+
### <!-- 5 --> 🧰 Maintenance
24+
- Test on MSRV, stable, beta and nightly Rust versions by @weiji14 in [#26](https://github.com/georust/geotiff/pull/26)
25+
- Set MSRV to 1.70 by @weiji14 in [#25](https://github.com/georust/geotiff/pull/25)
26+
- Add clippy lint GitHub Actions CI by @weiji14 in [#12](https://github.com/georust/geotiff/pull/12)
27+
- Fix various unused warnings by @weiji14 in [#10](https://github.com/georust/geotiff/pull/10)
28+
- Fix compilation errors on Rust 2021 edition by @weiji14 in [#9](https://github.com/georust/geotiff/pull/9)
29+
- Setup GitHub Actions Continuous Integration tests by @weiji14 in [#8](https://github.com/georust/geotiff/pull/8)
30+
31+
## New Contributors
32+
* [@weiji14](https://github.com/weiji14) made their first contribution in [#8](https://github.com/georust/geotiff/pull/8)
33+
* [@gschulze](https://github.com/gschulze) made their first contribution in [#17](https://github.com/georust/geotiff/pull/17)
34+
35+
https://github.com/georust/geotiff/compare/v0.0.1..v0.1.0
36+
37+
---
38+
39+
## [0.0.1] - 2020-07-14
40+
41+
### What's changed
42+
- Account for crate renaming by @frewsxcv
43+
- Bumped versions. by @dominikbucher
44+
- Updated README and LICENSE. by @dominikbucher
45+
- Test with tiled TIFF (not working). by @dominikbucher
46+
- Added get_value_at function. by @dominikbucher
47+
- Can now read grayscale images. by @dominikbucher
48+
- Updated some references in README.md. by @dominikbucher
49+
- Working on multi-layers. by @dominikbucher
50+
- Can read complete IFD now. by @dominikbucher
51+
- Initial commit, reading header info, such as magic number, byte ordering, IFD. by @dominikbucher
52+
53+
## New Contributors
54+
* [@frewsxcv](https://github.com/frewsxcv) made their first contribution
55+
* [@dominikbucher](https://github.com/dominikbucher) made their first contribution
56+
57+
https://github.com/georust/geotiff/compare/c00819eb0d8e9f91221fd9881e907e21754603c9..v0.0.1
58+
59+
<!-- generated by git-cliff -->

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 111 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
[package]
22
name = "geotiff"
33
description = "A GeoTIFF library for Rust"
4-
version = "0.0.2"
4+
version = "0.1.0"
55
edition = "2021"
66
authors = [
77
"Dominik Bucher <[email protected]>",
8-
"Gunnar Schulze <[email protected]>"
8+
"Gunnar Schulze <[email protected]>",
9+
"Wei Ji Leong <[email protected]>",
910
]
1011
repository = "https://github.com/georust/geotiff"
12+
license = "MIT"
13+
readme = "README.md"
1114
rust-version = "1.70"
1215

1316
[dependencies]
@@ -23,3 +26,109 @@ proj = "0.27"
2326

2427
[features]
2528
tie-points = ["dep:delaunator", "dep:geo-index"]
29+
30+
[package.metadata.git-cliff.changelog]
31+
# template for the changelog header
32+
header = """
33+
# Changelog\n
34+
All notable changes to this project will be documented in this file.
35+
36+
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n
37+
"""
38+
# A Tera template to be rendered for each release in the changelog.
39+
# See https://keats.github.io/tera/docs/#introduction
40+
body = """
41+
{%- macro remote_url() -%}
42+
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
43+
{%- endmacro -%}
44+
45+
---\n
46+
{% if version -%}
47+
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
48+
{% else -%}
49+
## [Unreleased]
50+
{% endif -%}
51+
52+
{% for group, commits in commits | group_by(attribute="group") %}
53+
### {{ group | upper_first }}
54+
{%- for commit in commits %}
55+
- {{ commit.message | split(pat="\n") | first | upper_first | trim }}\
56+
{% if commit.remote.username %} by @{{ commit.remote.username }}{%- endif -%}
57+
{% if commit.remote.pr_number %} in \
58+
[#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }}) \
59+
{%- endif -%}
60+
{% endfor %}
61+
{% endfor %}
62+
63+
{%- if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}
64+
## New Contributors
65+
{%- endif -%}
66+
67+
{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %}
68+
* [@{{ contributor.username }}](https://github.com/{{ contributor.username }}) made their first contribution
69+
{%- if contributor.pr_number %} in \
70+
[#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \
71+
{%- endif %}
72+
{%- endfor %}\n\n
73+
"""
74+
# A Tera template to be rendered as the changelog's footer.
75+
# See https://keats.github.io/tera/docs/#introduction
76+
footer = """
77+
{%- macro remote_url() -%}
78+
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
79+
{%- endmacro -%}
80+
81+
{% for release in releases -%}
82+
{% if release.version -%}
83+
{% if release.previous.version -%}
84+
[{{ release.version | trim_start_matches(pat="v") }}]: \
85+
{{ self::remote_url() }}/compare/{{ release.previous.version }}..{{ release.version }}
86+
{% endif -%}
87+
{% else -%}
88+
[unreleased]: {{ self::remote_url() }}/compare/{{ release.previous.version }}..HEAD
89+
{% endif -%}
90+
{% endfor %}
91+
<!-- generated by git-cliff -->
92+
"""
93+
# Remove leading and trailing whitespaces from the changelog's body.
94+
trim = true
95+
# render body even when there are no releases to process
96+
# render_always = true
97+
# output file path
98+
output = "CHANGELOG.md"
99+
100+
[package.metadata.git-cliff.git]
101+
# Parse commits according to the conventional commits specification.
102+
# See https://www.conventionalcommits.org
103+
conventional_commits = true
104+
# Exclude commits that do not match the conventional commits specification.
105+
filter_unconventional = false
106+
# An array of regex based parsers to modify commit messages prior to further processing.
107+
commit_preprocessors = [
108+
# Remove issue numbers.
109+
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" },
110+
]
111+
# An array of regex based parsers for extracting data from the commit message.
112+
# Assigns commits to groups.
113+
# Optionally sets the commit's scope and can decide to exclude commits from further processing.
114+
commit_parsers = [
115+
{ field = "github.pr_labels", pattern = "breaking-change", group = "<!-- 0 --> 🏗️ Breaking changes" },
116+
{ field = "github.pr_labels", pattern = "enhancement", group = "<!-- 1 --> 🚀 Features" },
117+
{ field = "github.pr_labels", pattern = "bug", group = "<!-- 2 --> 🐛 Fixes" },
118+
{ field = "github.pr_labels", pattern = "refactor", group = "<!-- 3 --> 🏭 Refactor" },
119+
{ field = "github.pr_labels", pattern = "documentation", group = "<!-- 4 --> 📝 Documentation" },
120+
{ field = "github.pr_labels", pattern = "maintenance", group = "<!-- 5 --> 🧰 Maintenance" },
121+
{ field = "github.pr_labels", pattern = ".*", group = "<!-- 6 --> 🌀 Miscellaneous" },
122+
]
123+
# Exclude commits that are not matched by any commit parser.
124+
filter_commits = false
125+
# Order releases topologically instead of chronologically.
126+
topo_order = false
127+
# Order of commits in each group/release within the changelog.
128+
# Allowed values: newest, oldest
129+
sort_commits = "newest"
130+
131+
[package.metadata.git-cliff.remote.github]
132+
owner = "georust"
133+
repo = "geotiff"
134+
token = "***" # https://git-cliff.org/docs/configuration/remote#token

README.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# A GeoTIFF library for Rust
22

33
[![geotiff on crates.io](https://img.shields.io/crates/v/geotiff.svg)](https://crates.io/crates/geotiff)
4+
[![docs.rs](https://img.shields.io/docsrs/geotiff?label=docs.rs%20latest)](https://docs.rs/geotiff)
45

56
> [!IMPORTANT]
6-
> 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!
1012
1113
## Motivation (pre-2020)
1214

@@ -23,21 +25,27 @@ You might also consider the [GDAL bindings](https://github.com/georust/gdal) for
2325

2426
## Library Usage
2527

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:
2729

2830
```rust
29-
TIFF::open("geotiff.tif");
31+
use geotiff::GeoTiff;
32+
33+
let reader = GeoTiff::read("geotiff.tif")?;
3034
```
3135

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:
3339

3440
```rust
35-
x.get_value_at(longitude, latitude);
36-
```
41+
use geo_types::Coord;
3742

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).
43+
reader.get_value_at::<u8>(&Coord { x: 10, y: 20 }, 0);
44+
```
3945

40-
Caution: the `longitude` and `latitude` are only in pixels, no coordinate transformations are applied!
46+
Where `x` corresponds to Longitude/Eastings and `y` to Latitude/Northings, depending on
47+
whether the GeoTIFF file uses a geographic or projected reference system. The `0` refers
48+
to the band/channel number.
4149

4250
## Development and Testing
4351

0 commit comments

Comments
 (0)