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
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
## Changelog
2
2
3
-
### 0.9.0 (2023-xx-xx)
3
+
### 0.9.0 (2023-03-14)
4
4
5
-
- Add support for building isolines as MultiLineStrings (instead of solely building contour polygons as MultiPolygons).
5
+
- Add support for building isolines as `MultiLineString`s (instead of solely building contour polygons as MultiPolygons).
6
6
7
-
- Improve some minor details in the documentation.
7
+
- Improve some minor details in the documentation and in the README (notably to refer to the [contour-isobands](https://github.com/mthh/contour-isobands-rs) crate)
Copy file name to clipboardExpand all lines: README.md
+15-5Lines changed: 15 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,19 +6,21 @@
6
6
7
7
Computes *isorings* and __*contour polygons*__ by applying [marching squares](https://en.wikipedia.org/wiki/Marching_squares) to a rectangular array of numeric values.
8
8
Outputs ring coordinates or polygons contours (represented using geo-types [MultiPolygon](https://docs.rs/geo-types/latest/geo_types/geometry/struct.MultiPolygon.html)s).
9
+
For each threshold value, the contour polygon are representing the area where the input values are greater than or equal to the threshold value.
10
+
9
11
The generated contours can also easily be serialised to GeoJSON.
10
12
11
13
*Note : This is a port of [d3-contour](https://github.com/d3/d3-contour).*
`ContourBuilder` is the recommended way to use this crate, as it is more flexible and easier to use (it enables to specify the origin and the step of the grid, and to smooth the contours, while `contour_rings` only speak in grid coordinates and doesn't smooth the resulting rings).
39
41
40
-
###Example:
42
+
## Example:
41
43
42
44
**Without defining origin and step:**
43
45
@@ -140,10 +142,18 @@ Feature {
140
142
}
141
143
```
142
144
143
-
### Demo
145
+
##WASM demo
144
146
145
147
Demo of this crate compiled to WebAssembly and used from JavaScript : [wasm_demo_contour](https://mthh.github.io/wasm_demo_contour/).
146
148
149
+
## Difference with the [contour-isobands](https://crates.io/crates/contour-isobands) crate (from [mthh/contour-isobands-rs](https://github.com/mthh/contour-isobands-rs) repository)
150
+
While this crate computes isolines (cf. [wikipedia:Marching_squares](https://en.wikipedia.org/wiki/Marching_squares))
151
+
and their corresponding polygons (i.e. polygons that contain all points above the threshold defined for a given isoline),
and their corresponding polygons (i.e. contour polygons that contain all points between a minimum and a maximum bound).
154
+
155
+
Depending on the desired use of the result, the [`contour-isobands`](https://crates.io/crates/contour-isobands) crate may be more suitable than this [`contour`](https://crates.io/crates/contour) crate.
156
+
147
157
## License
148
158
149
159
Licensed under either of
@@ -153,7 +163,7 @@ Licensed under either of
153
163
154
164
at your option.
155
165
156
-
###Contribution
166
+
## Contribution
157
167
158
168
Unless you explicitly state otherwise, any contribution intentionally submitted
159
169
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
0 commit comments