Weeknotes: 3rd August 2026

Last Week

Words not come good today - I basically blew all my writing energy on another post that is not yet published (explained below), and so this one will be quite short (other than the later sections, which I wrote as I went along last week).

Habitat mapping

I've done some more on the habitat mapping front. I implemented a iterative label refinement thing, an implementation of an approach similar to IPAL. This took a lot longer than I expected, mostly as working with GeoTessera is a lot slower than I assumed based on the data volumes I was using - my script ended up taking three hours just to process 50K points. I need to dig into this this week, as I don't know why it was slow, so could just be me being silly. But given how much experimentation I need to do, solving this is kinda key to making any progress. I did get the script to run though, and so now I can try refine the parameters to get better results vs the arbitrary thresholds I initially specified.

It did cause me to look into the data, which was kinda of interesting. I got 1,009,424 occurrences from GBIF for 2024 in the UK for 182 species I was interested in. This fell just to 58,017 when I filtered for samples within the species range! Now, to be clear, I've not taken all of the range polygons for each species, as I've ignored those labelled as "passage" - but I need to try sense check this, as it feels odd.

Of those 50K that remained, there's some super obvious biasing going on. If we look at the area around where I live:

There's clear clustering in the points that remain. If we look at the bits I've highlighted:

  1. This is RSPB Burton Mere - so somewhat obvious we get more sightings around nature reserves like this.
  2. The Leeds and Liverpool canal, a popular walking destination I assume?
  3. I'm surprised Formby forest isn't more popular, as it's a noted location for Red Squirrels.
  4. Conversely, I was surprised the town of Southport is so popular! I had a look, and it's mostly common birds, so I assume just there's a local active birding community there.
  5. A bit of woodlands - seems a common clustering point across the UK.
  6. I somehow forgot to add 6 :)
  7. Chester Zoo! Thankfully I filter out by species range, so there are no giraffes in here, but there's a lot of common UK species still tagged here.

The point is that the GBIF data, in the UK at least, is very unevenly concentrated, which means I have to also allow/adjust for that.

The final things I did was read through From Pixels to Patches: Pooling Strategies for Earth Embeddings and a similar discussion thread on our group Zulip, as Tessera beingat 10m is too fine scale for this work really: both the habitat maps I want to produce are for projects running at 1km or so, and the occurrence data is unlikely to be that good for 10m (which might be a part of why I've got so few occurrences).

Foundation model explainer

I took another go this morning at writing my "what is Tessera"/"what is a geospatial foundation model" explainer, and once again ran out of energy 2/3rds the way through. If nothing else though it's proving useful for refining my own understand of what it is - which ultimately is one of the main benefits of doing any form of teaching.

Yirgacheffe tweaks

I've started accruing some small updates to Yirgacheffe, which at some point I'll bundle into a minor release. To help make interop with Geotessera a bit better I've added support for using the Affine package for map projections. Yirgacheffe grew out of trying to wrap GDAL, so where necessary has been using its regular Python tuple for storing map offset and pixel scale, but GeoTessera is Rasterio based, and rasterio uses the Affine package with a different value ordering to GDAL. I've now updated Yirgacheffe to both accept the Affine objects for map projection and offsets, and also return them back when requested.

I also needed to process some polygon data for Ali, whereby I had to inspect a geopackage to get the metadata to let me pull apart the 200 plus project polygons into individual layers. I've had a ticket on Yirgacheffe to prove access to the data fields in geopackages and geojson for ages, so I finally just fixed that.

In both cases though this just reminds me of my plan for Yirgacheffe 3.0, which is to support using multiband data (so multiband GeoTIFFs or GeoPackages with many polygons in them) in operators that will then apply operators to each layer individually, allowing us to express parallelism in a declarative fashion. However, I'm not yet contemplating tackling that!

PAT testing

I went to a workshop at DoES Liverpool ran by Mike Gorman where I learned about how to Portable Appliance Testing - aka PAT, which is more commonly referred to as "PAT testing", living in that special language hell alongside "SCSI interfaces". I think we're all familiar with PAT being a thing required in most workplaces, so I thought it'd be fun to learn how to do it. It's not actually required by law in the UK that electrical goods are PAT tested[1], but it is required that workplaces provide a safe environment, and it's one part of demonstrating that which is why it's so pervasive; similarly insurance providers often require it, again as a standard way to check people are taking things seriously. Interestingly, equipment under a year old doesn't need testing as its assumed to have shipped in good condition.

Anyway, it was fun learning about the various classes of equipment that need testing, and about the (roughly) two parts of the test: doing a visual inspection to check for damage, check fuses are correct, and so forth, and then using the magic testing box (we were using a Kewtech EZYPAT) to check the appliance. Although it's automated quite a bit, you still are engaged in the process with many devices: for example I had to test a extension reel, and the acceptable resistance on an extension reel is a function of the cable length and the diameter of the cores within the cable, so some bookwork is required, as the magic box doesn't know that. If you can remember power equals current times voltage, then you have all the high school physics you need for this.

This Week

  • Looking into my Geotessera performance - is it an issue or is it unrealistic expectation?
  • Experiment with my label refinement process
  • Look to bring in other datasets to augment using specialists to refine generalists.
  1. (PATed? I think we should adapt that: we know the server is happy as it's been patted :)

    ↩︎︎

Tags: weeknotes, yirgacheffe