# \[ANN\] rtree 0.3.0

**URL:** https://discuss.ocaml.org/t/ann-rtree-0-3-0/18545
**Category:** Community
**Tags:** announce
**Created:** [September 18, 2026, 2:57pm UTC](https://discuss.ocaml.org/t/ann-rtree-0-3-0/18545 "2026-09-18T14:57:24Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![patricoferris](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/patricoferris/32/3621_2.png) [@patricoferris](https://discuss.ocaml.org/u/patricoferris)
#### Post date: [September 18, 2026, 2:57pm UTC](https://discuss.ocaml.org/t/ann-rtree-0-3-0/18545/1 "2026-09-18T14:57:24Z")

</div>

On behalf of the geocaml programmers, I am happy to announce the release of `rtree.0.3.0`. This release, after some [community](https://discuss.ocaml.org/t/ann-rtree-0-1-0/12785/6) [feedback](https://github.com/geocaml/ocaml-rtree/issues/41) removes the dependency on `repr`. For debugging and avoiding costly `Stdlib.( = )` comparisons, users must now provide their own `pp` and `equal` functions for whatever they are storing in the `rtree`.

It seems I did not add an announcement for `rtree.0.2.0` which added removal functions.

## Migration Guide

Without having to hand-write your functions, users who are already depending on `rtree` can reuse their runtime type representation to define their `pp` and `equal` functions, like so:

```ocaml
module Line = struct
  type t = { p0 : float * float; p1 : float * float }

  let t =
    let open Repr in
    record "line" (fun p0 p1 -> { p0; p1 })
    |+ field "p0" (pair float float) (fun t -> t.p0)
    |+ field "p1" (pair float float) (fun t -> t.p1)
    |> sealr

  (* ADDED: New lines that add [equal] and [pp] functions defined
     using the existing runtime type representation. *)
  let equal = Repr.equal t |> Repr.unstage
  let pp = Repr.pp t

  type envelope = Rtree.Rectangle.t

  let envelope { p0 = (x1, y1); p1 = (x2, y2) } =
    let x0 = Float.min x1 x2 in
    let x1 = Float.max x1 x2 in
    let y0 = Float.min y1 y2 in
    let y1 = Float.max y1 y2 in
    Rtree.Rectangle.v ~x0 ~y0 ~x1 ~y1
end

module R = Rtree.Make(Rtree.Rectangle)(Line)

```

However, users are encouraged to drop the dependency altogether and instead define these functions by hand.

Happy grouping-spatially! 🐫

---

_[View the full topic](https://discuss.ocaml.org/t/ann-rtree-0-3-0/18545)._
