Wednesday, November 18, 2026

Using AI to Analyze BC Public Tree Planting Bid Results

For this morning's entertainment, I decided to use AI to analyze some bid results.  Here are some of the background parameters that I adhered to:

- I wanted to use the data that has been posted on the Replant.ca forums over the past decade or so.  I could have used the original data source (BC Bid) but I figured that going to BC Bid would be much more resource-intensive, since agents would need to repeatedly crawl through thousands of unrelated non-planting bids on that site.

- I have the Replant.ca website set up with Cloudflare geo-restrictions, so it can only be accessed by people in certain countries.  I have the main Replant.ca website visible to visitors from twenty countries, but the forums are only visible to people in Canada, Great Britain, Australia, and New Zealand.  This was to prevent server overload from AI agents scraping data.  Earlier this year, the server was sometimes getting 1.5 million hits per day, almost entirely from AI training hits to the forums, and it was limiting access to the board.  I could have temporarily turned the Cloudflare protection off for this task, but instead I decided to change a board setting that limited the number of posts per page (I changed it from 50 to 250).  This allowed each "year" of posts to be displayed on a single respective web page.  Then I visited each year's page and used the Print dialog to save the page to PDF, thereby capturing all data.  Incidentally, if anyone tries this, using "Save to PDF" embeds the data differently than "Microsoft Print to PDF" - which is more image-oriented and less easy to read effectively.

- I uploaded all of my PDFs (one each for 2009 through 2025) into ChatGPTs Work tab.  I asked it first to read and analyze the PDFs, and to make sure it understood the data contained therein.  I then told it that I was going to ignore 2009 to 2014 PDFs for now, and only concentrate on the period from 2015 to 2025 inclusive.  I didn't include 2026, because we're only partway into the bidding season right now.

- I frequently asked Chat to ignore Coastal bids in my various queries. 

- I was using ChatGPT 6.1 Terra on High intensity, even though 6.2 Astra and 6.2 Sol are now available.

- I went into this with the mindset that Chat would probably make mistakes, and since this is just a casual experiment, I wasn't going to go through and replicate the work by hand to verify all results.  I'd do that if this was some sort of critical task, but this is just a fun experiment. 

Now that I've added all of these PDFs to Work, I'm able to analyze them with tons of different queries, over and over again, without Chat needing to scrape data every time.

 

For my first query, I asked Chat to create a chart to graph all bids over time.  Again, I restricted the chart to the period from 2015-2025.  I asked Chat to ignore all bids which didn't have price data.  In order to "clean up" the data somewhat and ignore lottery bids and unrealistically high bids that would throw off averages, I asked Chat to ignore any bids which worked out to greater than $1.50 per tree.

This is the chart that was generated:

 

 

Anyone who is familiar with the bidding over the past decade will probably look at this closely and have two questions:

1.  "Why are there so few bids in 2021 compared to other years?" - This was the second year of Covid, and the government wasn't releasing data right away.  So we just waited until each bid closed, then I collected bid data from each individual contractor so we all had a full set of results behind-the-scenes.  However, we didn't want to share most of that data publicly.

2.  "Why is there a dot in 2025 which looks like a stupidly low price, is that an error by the AI?" - No, that was Marlo's bid in Fort St. John, which ended up being disqualified.

The value of this graph, even if it isn't perfect, is that it gives us a good understanding of how bids have trended upward over time, which is not surprising considering inflation.  And it also shows us years when the herd moved upward or downward.  This probably shows us that planting companies feel the hit of unsustainable pricing in unison.

---

Next, I asked Chat to generate a series of charts for individual companies, to show how each of their bidding attempts evolved over time.  Here are half a dozen examples, picking some of the larger companies or more frequent bidders, presented in alphabetical order:


 

 








Fun stuff.

---

Next, I asked Chat to summarize which companies had been putting in a lot of bids.  This is the query that I used:

Can you provide me a text list itemizing how many bids each company has submitted during the period from 2015 to 2025 inclusive?  Do not include bids above $1.50/tree.  Do not include bids for which no price per tree was provided in the PDF.  Rank the list from the company with the most bids down to the company with the fewest bids.

I got the following list, which I then amended by grouping companies that had fewer than 20 bids over that 11-year period:

 


That's a lot of bids.  I'm not surprised by the high number at Folklore ... I've driven a lot of miles during viewing season over the past decade and I've walked around blocks which were prescribed for hundreds of millions of trees (also, I was just one of several people doing the viewing work).  Incidentally, when I count up all the blocks that I've visited while viewing, and all the blocks that I was responsible for during my 35 years as a camp supervisor, I estimate that I've visited/seen blocks all over BC and Alberta that added up to more than three hundred and fifty million trees.

---

My next query was about spring versus summer trees.  I wanted to estimate the overall difference between spring and summer trees.  This was my query:

Ignoring any coastal contracts, what do you think the overall weighted average price is in the BC Interior from 2015-2025 for spring trees versus summer trees?  Ignore contracts where there are both spring and summer trees on the same contract.  Ignore Fall contracts.

This was the result:

This result actually surprised me, because there's generally more competition for summer trees, as there are fewer summer trees on the market each year.  However, it's a reassuring result - a lot of summer trees in BC, which are usually in the northern half of the province, are a lot uglier than spring trees due to green-up.

---

Next, let's look back at some of the jobs where the lowest two bids were pretty close:


 

---

 

I think the main thing that everyone needs to remember is that this collection of data is fairly substantial, but it is not complete.  We were missing a few bids each year, we didn't share a significant portion of the 2021 bids, and I probably have a bunch of typos scattered throughout the data.  Also, ChatGPT and other AI's can make mistakes.  I would not place much trust in the complete accuracy of the responses that were generated.  Chat itself frequently pointed out various weaknesses in the underlying data that I provided.

It was a fun exercise, nonetheless.

I'll leave you with some final food for thought.  If you were to do some analysis yourself, what would you ask?  I asked ChatGPT Work to give me some ideas.  This was my query:

I'm thinking about all of the data contained in the 2015-2025 PDFs.  What interesting analysis tasks can you think of, which might provide some fun or interesting insights into the data contained therein?

I got a VERY long answer.  I'll share that in a second, for anyone looking for some data mining inspiration.  But first, if you'd like the collection of PDFs that I used, here's a quick download link to save you some time:

   www.replant.ca/docs/Public_Bid_Results_Archives_2009-2025.zip     (158MB) 

 

I'm out of here for today, it's time to go outside and touch grass, but here's where Chat would like to take you next:

 

There is enough material in those PDFs to explore much more than whether bid prices increased. The most interesting questions, in my view, concern competition, bidding behaviour, regional differences, and how often a contractor’s assessment of a job differs sharply from everyone else’s.

I’d group the possibilities into several broad themes.

1. How competitive were public planting bids?

Number of bidders per contract, over time

For each year, calculate the average and median number of companies bidding on a public contract. We could show the individual contracts as dots and identify years when competition became noticeably stronger or weaker.

Questions this could answer:

  • Did the increase in tree volumes around 2018–2021 lead to fewer bidders per job?
  • Did the number of bidders recover or decline as volumes changed?
  • Were some districts consistently more competitive than others?
  • Were large contracts more likely to attract a crowd than small contracts?

Important detail: For this particular analysis, I would count bidders whose names are listed even when their prices are missing. We would still follow your $1.50 rule where a price is known, but a bidder with no published price could not be classified against that ceiling. I would therefore show those bidders separately or exclude them from the filtered count. That distinction matters especially in 2021.

Does more competition lead to lower bids?

For each contract, compare the number of bidders with:

  • The lowest posted bid.
  • The average bid.
  • The difference between the lowest and second-lowest bids.
  • The spread between the lowest and highest bids.

A scatterplot might reveal, for example, whether jobs with ten or more bidders tended to have tighter pricing than jobs with only two or three.

The challenge is separating cause from correlation. Easy, desirable jobs might attract more bidders and command lower prices because they are easier. Ideally, we would compare contracts within similar regions, seasons, years and size ranges.

How often was there only one bidder?

We could identify every contract in the PDFs that attracted a single bidder and examine:

  • Who submitted the bid.
  • The price per tree.
  • Where and when the work was located.
  • Whether the contract had difficult access, special qualifications or other unusual requirements.
  • How the price compared with similar contracts that attracted multiple bidders.

This could produce a useful catalogue of situations where the public tender process generated little direct competition.

2. What do the bids reveal about company behaviour?

A head-to-head comparison between companies

Pick two companies—say, Folklore and Seneca—and identify contracts on which both submitted bids.

For each shared contract, calculate:

Folklore’s bid per tree minus Seneca’s bid per tree

We could then report:

  • Number of head-to-head bids found.
  • How often each company bid lower.
  • The median difference in cents per tree.
  • The largest differences in each direction.
  • Whether the relationship changed over time.

This is potentially more informative than comparing each company’s overall average. If two companies bid on different mixes of coastal, Interior, spring and summer work, their overall averages are not directly comparable. Looking at the same contracts controls for many of those differences.

We could repeat this for any pair:

  • Folklore versus Dynamic.
  • Seneca versus Brinkman.
  • Torrent versus Coast Range.
  • Spectrum/Wright versus Dynamic.
  • Windfirm versus Whanau.

A head-to-head matrix for the major companies

We could expand the preceding idea into a table or heatmap. Each cell would answer:

When both companies bid on the same job, how often did the company in the row submit the lower bid?

For example, a cell might show 60% over 20 shared bids. The number of shared bids is essential: a 100% rate based on two encounters is far less informative than a 60% rate based on fifty.

We could also express the result as the median cents-per-tree difference rather than simply who was lower.

This would probably be one of the most interesting analyses in the collection.

Who bid most often—and who won most often?

For each company:

  • Number of bids found.
  • Number of times it submitted the lowest posted price.
  • Number of apparent awards, where the PDF confirms the award.
  • Number of times it ranked in the top three.
  • Median bid rank.
  • Percentage of its bids that were lowest.

I would keep “lowest bid” and “awarded contract” separate. The contractor rating system, eligibility decisions, withdrawals and other factors mean those are not always the same thing.

This could show the difference between a company that bids frequently and selectively prices high versus one that bids less often but places near the bottom of the price list.

How selective were different companies?

A company’s bidding pattern could be profiled by:

  • Regions where it bid.
  • Average and median contract size.
  • Spring versus summer work.
  • BCTS versus Ministry or other public clients.
  • Coastal versus Interior work.
  • Percentage of bids where it ranked first, second, third, and so on.

For instance, we might find that one company tended to target large northern Interior programs while another appeared more often on smaller coastal contracts. That would help explain why their overall price averages differ.

We could present this as a set of company profiles, with one page per major contractor.

Which companies showed the greatest variation in bidding?

For each company, measure the spread of its own bids:

  • Lowest and highest qualifying bids.
  • Median bid.
  • Middle 50% of bids.
  • Range after adjusting for year and region.

A company bidding between 40¢ and 90¢ may simply have bid on very different ground. A more useful version would compare how far above or below the other bidders it tended to be on the same job.

For example:

On its shared contracts, did Company A usually stay close to the middle of the pack, or did it alternate between very aggressive and very high bids?

3. Where was money left on the table?

Largest gaps between first and second bids

This is an obvious and entertaining one: rank the contracts by how much the lowest bidder left on the table compared with the second-lowest bidder.

We could measure the gap three ways:

  1. Total dollars: second-lowest bid minus lowest bid.
  2. Cents per tree: second-lowest unit price minus lowest unit price.
  3. Percentage: the difference expressed relative to the lowest bid.

Each metric tells a different story. A 5¢ gap on five million trees is financially much larger than a 20¢ gap on a small contract.

The list could include:

  • Contract number and location.
  • Tree count.
  • Lowest and second-lowest bidders.
  • Their bid amounts and prices per tree.
  • Dollar gap and percentage gap.
  • Any relevant commentary from the post, such as difficult access or an unusual tender specification.

We would identify these as gaps in the posted bids, not money that the winning company necessarily could have captured. Raising its bid might have changed the ranking or the award.

How common were large gaps?

Rather than only highlighting dramatic cases, show the distribution:

  • What percentage of contracts had a first-to-second gap under 2%?
  • How many had a gap under 5%?
  • How many exceeded 10%, 20%, or 50%?
  • Did the typical gap change over the years?

We could make a separate comparison for big jobs versus small jobs and for coastal versus Interior jobs.

Which companies most often submitted a bid far below the field?

For every bid, compare the company’s price with the median of the other bids on the same job.

For example:

A company bid 45¢; the median of its competitors’ bids was 60¢. Its bid was 15¢, or 25%, below the competitors’ median.

We could then identify:

  • The most extreme individual examples.
  • Companies most frequently below the field.
  • Companies most frequently above the field.
  • Whether those patterns changed by year.

I would require a minimum number of competitors—perhaps three other priced bids—before calculating the comparison. Otherwise, one unusually high or low competitor can distort it.

This would need careful language: a low relative bid could reflect better knowledge of the ground, a different operating model, an error, a desire for summer work, or a number of other factors. The numbers alone cannot tell us which.

The closest finishes

At the other extreme, rank the tightest bids:

  • Smallest dollar gap between first and second.
  • Smallest difference in cents per tree.
  • Smallest percentage gap.
  • Closest cluster of the top three or top five bidders.

Your 2025 Terrace example, where Sapling and Summit were separated by $68, would be a strong contender for one of these lists.

For a particularly fun version, we could calculate how many trees would account for the gap at a given price. That would be a descriptive illustration, not a suggestion that contract pricing literally works one tree at a time.

4. How did prices vary by location and job type?

Coastal versus Interior prices

Produce separate annual weighted-average lines for:

  • Interior contracts.
  • Coastal contracts.
  • Possibly a third category for northern and remote coastal work.

This would show whether the gap between coastal and Interior bidding widened or narrowed over the period.

However, “coastal” is not a single operating environment. A Vancouver Island road-access job and a remote inlet contract requiring a boat or helicopter can have very different economics. I would also retain the $1.50 ceiling, which may remove a larger share of the most difficult coastal bids and therefore bias a coastal-versus-Interior comparison. We should report how many bids the ceiling removes from each group.

Prices by district or timber sales office

For locations with enough observations, compare annual weighted averages and distributions for areas such as:

  • Prince George.
  • Mackenzie.
  • Fort St. James/Vanderhoof.
  • Burns Lake/Houston.
  • Quesnel.
  • Williams Lake.
  • Kamloops/Merritt.
  • Cranbrook and the Kootenays.
  • Port McNeill, Campbell River and other coastal offices.

We could make this either a table or a set of small charts. A map could be useful, though the geographic assignment would normally represent the administering office or stated work area, not the exact locations of every block.

Spring versus summer prices

Using contracts clearly identified as spring-only or summer-only, compare the price distributions within the same year and region.

This could test the familiar idea that summer work often sells at a discount because companies want to retain crews after the main spring season.

Potential results:

  • Median spring bid versus median summer bid.
  • Difference between spring and summer lowest bids.
  • Whether the gap changed between, say, 2015 and 2025.
  • Whether the gap was larger in some regions than others.

Mixed spring/summer contracts would need their own category unless the PDFs provide separate volumes and prices for each season.

Does contract size affect price?

Group contracts by the size categories already used in the charts:

Size categoryTrees
SmallFewer than 500,000
Medium500,000–1.5 million
LargeMore than 1.5 million

We could compare prices, bidder counts and first-to-second gaps across those groups.

An interesting question is whether larger contracts generally attract lower prices per tree because fixed costs are spread over more trees—or whether they sometimes attract fewer bidders because fewer companies can take on the volume.

We should compare within the same year and region where practical. A large, straightforward Interior job and a small, complex coastal job are not directly equivalent.

Summer work and the “crew retention discount”

A more targeted version would focus on companies that bid on both:

  • A spring contract; and
  • A summer contract in the same region and year.

We could ask whether the same company tended to bid lower on its summer job. It still would not be a controlled experiment, but it would be more informative than comparing every spring contract with every summer contract.

5. What effect did the contractor rating system have?

How often did the lowest dollar bid fail to rank first?

The posts sometimes explicitly note when contractor ratings changed the order of bidders. We could catalogue those contracts and record:

  • Lowest dollar bidder.
  • Bidder ranked first after the rating adjustment.
  • Difference between their posted bid amounts.
  • Region and year.
  • Whether the PDF confirms the eventual award.

This could show how often rating adjustments visibly affected rankings within this collection. It would not establish the rate across all BCTS contracts, because not every post may identify every adjustment.

Closest decisions affected by ratings

A related list could identify contracts where:

  • The lowest dollar bid was overtaken by a slightly higher bid after ratings; or
  • Ratings moved a bidder several places up or down the award order.

We could look for the largest observed dollar difference between the lowest bid and the first-ranked bid, while being careful to use the actual posted amounts and to distinguish ranking from confirmed award.

For years in which the published prices were described as adjusted prices, we would need to identify that explicitly rather than mixing them silently with original tender amounts.

6. What changed over time?

Inflation-adjusted bid prices

The charts we have made so far use nominal cents per tree: 40¢ in 2015 is compared directly with 40¢ in 2025.

We could adjust the annual figures for inflation and show both:

  • Nominal prices, as posted.
  • Inflation-adjusted prices, expressed in a common year’s dollars.

That would help answer whether bids increased faster than general consumer prices. We could also use a more industry-specific cost measure if we find a suitable one, though no single index perfectly captures planting costs such as wages, food, vehicles, insurance and camp expenses.

This would require external data and a clear choice of inflation index.

A before-and-after view of the volume expansion

We could compare bidding patterns across periods such as:

  • 2015–2017.
  • 2018–2020.
  • 2021–2023.
  • 2024–2025.

For each period, show:

  • Prices.
  • Number of bidders.
  • First-to-second gaps.
  • Regional mix.
  • Contract sizes.
  • Share of bids from each company.

The periods could reveal changes around the beetle, wildfire and increased-reforestation years. They would not, by themselves, establish what caused those changes.

Did bid prices rise at the same pace for all companies?

A multi-line chart could compare companies’ annual tree-weighted averages, but I would also build a stronger same-contract comparison to control for differing work mixes.

That could reveal whether, on jobs where they competed directly, the relative gap between two companies became wider, narrower or reversed over time.

7. Unusual contracts and interesting stories

The PDFs contain your descriptions and discussion, not just bid tables. That makes some more qualitative analyses possible.

A catalogue of unusually difficult specifications

Search the posts for references to:

  • Helicopter access.
  • Boats and barges.
  • Long quadding or walk-in distances.
  • Remote camps.
  • Numerous small blocks.
  • Fill planting and burned ground.
  • Fertilizer requirements.
  • Unusual stock types.
  • Steep or rocky ground.
  • Tight completion windows.
  • Extra survey or supervision obligations.

We could then list the associated contracts and their bids. The result might become a fascinating “why this job priced differently” reference.

Some of those categories would need manual review. A post mentioning a helicopter does not necessarily mean that every block, or even the majority of the trees, required helicopter access.

The biggest disagreements over the same ground

Rank contracts by the difference between the lowest and highest qualifying bid, in both dollars and cents per tree.

A wide range can signal very different assumptions about access, production, logistics, risk or the value of keeping a crew employed. The most interesting cases would pair the numbers with whatever you wrote after looking at the blocks.

Because the $1.50 ceiling removes high bids, it would truncate the spread on some jobs. We could still apply your default ceiling, but flag contracts where at least one higher bid was excluded.

Contracts where nearly everyone agreed

Find jobs where several bidders—perhaps at least five—were clustered within a narrow band. Examples could include:

  • All qualifying bids within 10% of the lowest.
  • At least five bids within 5¢ per tree.
  • The smallest range among jobs with six or more bidders.

This would complement the “largest disagreements” list and might identify jobs where companies had unusually similar expectations.

Your historical predictions versus later results

Your posts often include comments about where you thought prices were headed, whether a job looked attractive, and whether a bid seemed low.

A fun retrospective would collect a selection of those comments and compare them with later information in the PDFs:

  • Predictions that were borne out.
  • Predictions that turned out differently.
  • Jobs where the forum discussion identified a risk that later became relevant.
  • Comments about future industry conditions that look particularly interesting in hindsight.

That would be partly editorial and would need care: the PDFs may not tell us whether a contractor actually made or lost money on a job.

The analyses I would prioritize

If you wanted the most informative first batch, I would start with these:

  1. Head-to-head company comparisons, because they compare bids on the same ground.
  2. Largest and smallest gaps between first and second bids, with contract details.
  3. Number of bidders per contract over time, including a clear treatment of missing prices.
  4. Regional and spring-versus-summer price differences.
  5. Contractor-rating reversals, where the posts provide enough detail.
  6. Inflation-adjusted annual bid prices.

Before doing a large series of comparisons, I would rebuild the underlying bid records into a single auditable table with the source PDF and page for every entry. The work we have already done exposed enough missed entries, repeated posts, name variations and inconsistent figures that it would be unwise to treat the existing chart extractions as a finished database. That table would make it much easier to check any surprising result and would give us a dependable foundation for all of the analyses above.

 

 

 

Monday, November 16, 2026

Calculating Target Inter-Seedling Distance on Tree Planting Sites

 One of the most common questions that a crew leader hears when arriving to a new tree planting block is "what's the density?"

 And almost as common, when a crew leader tells a new planter what the density is supposed to be, the planter will ask "what spacing [between trees] is that?"  (And let's call this number the nominal Contract Spacing). 

 Despite my recent series of posts about using AI as a tool to help with a lot of reforestation management tasks, this post is completely unrelated to AI.

 Several years ago, inter-tree spacing was briefly an active topic on the Replant forums.  We were trying to figure out how to properly calculate the exact average spacing required between trees in order to properly hit a target density on a block.  I didn't ever feel that we resolved that discussion satisfactorily.  A few weeks ago, I was reviewing a public tree planting tender in BC that listed the target spacing as 3.1m, and I wondered how they calculated that number.  Incidentally, they were suggesting that a target spacing of 3.1m would result in achieving 1200 stems/hectare overall density.

 Let's start by looking at this Spacing Chart.  Where did I get these numbers?  I pulled them from Appendix 1 of British Columbia's Planting Quality Inspection Guide, which offers guidance for completing FS 704 Planting Quality Assessments.  This guide is produced by BC's Ministry of Forests, Lands, and Natural Resource Operations.

 


 

 By the way, if you'd like to see a copy of the full Guide, go to our public Dropbox folder at www.replant.ca/dropbox and then go into the "Canadian Reforestation" sub-folder, then into the "Documents Archive" sub-folder, then look for the PDF called "FS704 Planting Quality Inspection System."

 I should point out, before I go into a deep dive on this subject, that I understand it a lot better now than I did a decade ago.  I've been taking GIS courses from BCIT for the past several years, and a lot of them touch upon surface topology, triangulated irregular networks, etc.  So this post will address a lot of different ways of looking at a subject, rather than just some simple math.

 Let's start by looking specifically at density of 1200 stems/hectare (1200sph).  My chart above shows an average spacing (nominal contract spacing) of 3.1m between trees.  Other publications might suggest an average spacing of 2.89m between trees.  This difference is around twenty centimetres, which doesn't sound like much.  However, that's very significant when extrapolated across an entire planting block.

 Both numbers may have mathematical calculations supporting them, so which one is correct?  Well, both are.  This is because they represent two slightly different ways of calculating the amount of ground that each individual tree occupies.  To keep things simple (for now), the difference comes down to whether you're thinking about "square spacing" or "triangular spacing."

 

Square Spacing 

 Some people think that a "perfect" block would be a plowed farmer's field, with trees planted in a perfect square grid.  There are no rocks or logs on the ground that would prevent the planter from putting the seedlings in the perfect microsites that result in this perfect square spacing.  Visual representations will really help out here.  If we're planting a "square grid" the seedlings should be arranged roughly like this:

 


 

In such a situation, the average distance to the nearest neighbour should be represented by the following formula:


 

So in this case, let's say that spacing works out to the square root of (10000/1200) or 2.89 meters between trees.  Ok, that's good, because that's one of our popular choices mentioned in the introduction.

 We also have to count "closest neighbours."  In this type of grid, our average spacing is based upon the distance to the FOUR closest neighbours. 

 

Triangular Spacing

 What if we still have a perfectly spaced grid, almost like a hexagonal honeycomb pattern, but this time the spacing is based on triangles?  This seems a lot better in my mind, because we often teach planters to "make triangles" when we're teaching spacing.  In such a case, a "perfect" block with triangular spacing might look like this:

 


 
In this new situation, the average spacing to the nearest neighbour should be represented by the following formula:


 In this case, the spacing should work out to be the square root of (20000/(1200 x sqrt 3)).  This works out to be 3.10 meters between trees, the other of our popular choices.  And this is also the choice that BC's Ministry of Forests picked, which I'd support, because I'd argue that it more closely matches what we find in the field.

 I'll also point out that in this type of grid, our average spacing to the closest tree is based upon spacing to our SIX closest neighbours.  Also, an assumption is that all of our triangles are perfect equilateral triangles.

 

Irregular Spacing

 Let's be honest, planting blocks are almost never slash-free and rock-free and perfectly flat.  So it's effectively impossible to plant trees in a perfect grid.  And even in those very rare cases where it's possible, I'd quickly argue that it would be stupid for a planter to try.  Why waste time trying to achieving perfection when "95% of perfect" is also acceptable?  That's the sort of concept that a lot of quality assessment systems use as an underlying assumption.  Assuming that "almost perfect" is an acceptable goal is the best way to effectively balance quality against production.  Both are important goals.

 Also, Mother Nature doesn't grow trees in perfect grids.  If we're trying to emulate Nature, then we should be aiming for some randomized spacing.

So let's look at a grid where the trees are spaced completely randomly.

 


 

In this example, trees are placed truly randomly.  This is what we'd encounter if a professional tree planter closed their eyes to pick microsites.  In a case like this, how do we pick how many "closest neighbours" we have?  That's the first big problem.  Also, planters don't generally plant trees like this.  We have spacing rules that need to be respected:

"Maximum Spacing" - the FS 704 doesn't have a fault for spacing that is significantly greater than target spacing.  There is a fault code, B2 (wide spacing) but this is a warning rather than a fault.  A planter only takes a hit on wide spacing if the spacing is so wide that a missed spot is created, which hits quality in a different way than a direct fault (wide spacing can indirectly lower quality by increasing the number of plantable spots).  But to keep things simple, let's assume that we don't want to space our trees too far apart, partly because of the "wide spacing" rules and partly because we make money by planting trees.  We don't want to do unnecessary walking without planting, if possible.

"Minimum Spacing" - the FS 704 does have a specific fault for spacing that is under a specified "minimum inter-tree distance" (MITD).  That's fault code B1, also known as "Too Close."  Every contract will specify a specific minimum spacing, and trees that are closer to each other than that MITD results in one fault for each pair of trees (if it could have been moved to an acceptable spot).  Typical MITDs usually seem to be 1.5m or 1.6m on most contracts.  Occasionally, we still see minimums of 2.0m, but that's becoming less common, and is usually only on blocks with densities of 1200sph or lower.

 So if a planter is being conscientious about trying not to have double-plants or trees planted at less than MITD to another tree, then we shouldn't have any trees as close to each other as might be expected when they're placed randomly.  I'll even go so far as to suggest that we can come up with an estimate of what the "minimum" and "maximum" spacing might be.

 I think that it's fairly common to say that we won't see many trees at less than 1/2 of the target spacing, if a planter is paying attention and the block isn't especially green, or if the planter is using ribbon.  And I'll also say that because we don't want to walk unnecessarily, we won't see many trees at greater than 3/2 of the target spacing.  So if the target spacing on a hypothetical block is 3.0m between trees, I'll suggest that in most cases we probably won't see too many trees under 2.0m and we won't see too many trees at greater than 4.5m spacing.  Let me be very clear though:  This generalization is based simple on field experience and has absolutely no basis in real math/geometry!  It's not always accurate either.  But it's a good way to temporarily create an assumption for the next step.  Let's pretend that our trees are spaced randomly, but none of them are less than 2 meters apart, and none of them are more than 4.5 meters apart.  Our new "random grid" might look something like this:

 


 In my mind, this type of semi-random pattern (random but with minimum and maximum spacing constraints) is what I consider to be "perfect" spacing.  It's not symmetrical, nor is it mathematically perfect.  But it partially emulates the randomness of nature while introducing artificial constraints that maximum overall "elbow room" for each individual tree, which often [but not always] contributes to maximizing long-term growth for each tree as it competes for environmental resources.

 Our problem now is to come up with a formula that recognizes this irregularity.

 I'll be clear up front:  I can't.

 My problem here is that I can't come up with any way to decide how many of the "closest neighbours" should be considered when coming up with an average spacing from those neighbours.  Should we consider our 3 closest neighbours?  4 closest?  6 closest?  Or a varying number which fluctuates based upon the relative positioning of random trees?  The number of closest neighbours used will affect the answer to a new target spacing formula.

 To be accurate, if I know the exact locations of all the trees on the block, then I can use the "mean nearest-neighbour distance" - but that only helps me figure out data for a block that has already been planted.  I could use the homogenous Poisson Point Process, but that doesn't allow for minimum spacing constraints. 

 We can't assume that average spacing is the average of "minimum spacing" and "maximum spacing," partly because those terms can't technically be defined (although I suppose minimum could equal zero).  Also, even if they could be defined, is there a standard bell-shaped distribution between the two extremes, or is it more likely to see trees closer to the minimum than to the maximum?  I just can't figure out a world where I could come up with a defensible assumption for these variables.

 If we use pattern factors, and introduce a dimensionless factor representing the spatial arrangement of the trees, we can come up with a formula which lets us calculate the average distance to the closest tree.  But that's useless, because that's a small value which is pretty useless for a planter.  We can't answer, "What spacing should I use?" with an answer of, "Some unknown number greater than 1.37236 meters." (This was a randomly picked number).

 What we're dealing with here is an "effective but not absolute" model which is close to a spatially inhibited random process.  We can get into complex models (they exist, and are commonly studied in GIS!) such as the Clark-Evans nearest-neighbour model (no relation), or hard-core or Strauss processes.  But these models can't provide a universal value for our two constraints in our dimensionless factor formula.  So I think this is a dead end, or at the very least, math which is definitely above my pay grade.

 

Initial Conclusion

 At this point, I think I've explained enough for you to understand where the specific numbers on the Replant Spacing Chart came from - they came from the FS 704 Guide produced by BC's Ministry of Forests, and THEY got the numbers by using a formula for a block where the distribution of trees approximated a triangular pattern.

 I don't think we need to go any further, if that's all that you were trying to learn.  But for those of you who are feeling more adventurous ...

 

Triangulated Irregular Networks

 Let's introduce another dimension into our analysis.  So far, we've looked at flat 2D graphics representing our planting blocks.  But most blocks have at least some slope or rolling topography.  How does that affect our spacing?  For this section, I can fall back on things that I learned in my GIS classes.

 Triangulated Irregular Networks (TIN's) are used frequently to create three-dimensional representations of terrain (surface topology).  Imagine if you walk all over a planting block with a GPS, collecting thousands of GPS points in which each point includes a known elevation.  GIS software such as ArcGIS or QGIS can connect these points into a network of adjoining triangles, using a method called Delaunay triangulation.

 Unlike one of our earlier examples of perfectly equilateral triangles, the triangles in a TIN can have almost any shape, as long as they all have three straight sides.  They can be large, small, thin, fat, etc.  When combined into a complete surface, they will approximate the hills, valleys, ridges, and slopes of our planting block.

 The interesting thing in a Delaunay triangulation is that there are rules to determine "connected" trees (triangle edge segments).  Also, in a sufficiently large two-dimensional triangulation, the average number of connected neighbours approaches six.  Not all trees have six connected neighbours, but the overall average trends toward six as sample size increases.  This is good.  But what is not good is that the Delaunay-connected neighbours are not necessarily the six closest trees.  Also, what happens if a triangle stretches across an unplantable gap?

 Voronoi diagrams (Thiessen polygon networks) might also be useful.  This sounds like something very theoretical and fancy, but they're a very basic core concept in GIS work.  In a Voronoi diagram, trees are surrounded by polygons (contained within their polygons) and the main rule is that every point within a specific tree's Voronoi polygon is closer to that tree than to any other tree.  Here's a Voronoi diagram that I found online:

 


 The only real drawback with Voronoi diagrams is that they really help with analyzing the amount of elbow room that each tree has while growing up.  They don't seem to help with analyzing spacing, at least not at first glance.  ArcGIS has built-in tools such as the Thiessen Polygons Tool to analyze these, but again, not much help with respect to average spacing.

 Admittedly, a tree's nearest neighbour is guaranteed to be one of its Delaunay-connected neighbours, but that only helps with respect to a single adjacency rather than averages. 

 Anyway, I'm getting into the weeds here.  Let's go back to thinking about our block.  If we recorded the precise location (including elevation) of every tree planted on the block, we could use those points to create a TIN.  The resulting triangles would almost certainly be irregular rather than equilateral, reflecting the fact that planters select their microsites based on available planting spots rather than trying to establish a mathematically perfect grid pattern.

 All good so far.  But remember that the distance between two trees measured along the surface of a slope isn't necessarily the same as the horizontal distance between them!  This is something that inexperienced planters often struggle to understand.

 Think about how trees grow over time, especially conifers which generally have straighter trunks than many Canadian deciduous species.  Although seedlings may be planted on steep slopes, their stems generally grow vertically, responding to gravity.  They don't grow perpendicular to the surface of the hillside at their particular microsite location.  Therefore, when we're discussing stocking density and inter-tree spacing, we need to imagine looking straight down at the trees from above, rather than measuring distances along the face of the slope.

 An example:  Imagine planting two trees, one directly uphill from the other on a 45-degree slope.  If you measured 3.00 meters between these trees along the ground surface, their actual horizontal separation between the trunks once the trees have grown up will be only 2.12 meters.  That's a significant difference.  The steeper the slope becomes, the greater the discrepancy.

 


 Incidentally, this adjustment only applies to the "uphill/downhill" component of the distance.  If you're planting directly across the slope, along a contour line, the horizontal and ground distances should effectively be the same.

 So why is it useful for [some] tree planters to understand TIN's?  Well, GIS software can calculate both the actual three-dimensional surface area of a triangle in a TIN, and also its two-dimensional "projected" area (what you see when looking at the TIN from high above).  In conventional reforestation standards, it's the horizontal projection that matters.  A "mapped hectare" always represents exactly 10,000 square meters of horizontal area, even though the actual ground surface may be considerably larger due to slopes.  The more slopes, the more surface area.  So if you have a heavily-sloped block, and you're asked what the surface area is, the immediate answer of 10,000 square meters is just the 2D horizontal area occupied by the hectare.  The actual ground surface might be more like 13,000 square meters, or 14,000 square meters, or some other number.

 If we project our 3D network of planted trees onto a flat map, we'll see an irregular arrangement of triangles (if we draw segments between trees).  Some of these triangles might be nearly equilateral, but many others would be irregular, stretched or compressed due to avoiding obstacles and picking the best microsites.

 And that's how tree planting really works.

 

 

 

Thursday, November 12, 2026

Create a 100m Grid KML as a Reference Grid for Pay Plotting

When we throw pay plots on tree planting blocks, we typically use a 100m grid to pick plot locations, which results in a plot density of approximately 1 plot per hectare.

Most mapping apps (such as Avenza Maps) don't have any functionality in them to automatically create a digital grid overlay to guide us.  It's possible to create a grid manually, but that's a very tedious and time-consuming approach, taking several minutes for a single small block, and sometimes fifteen to twenty minutes for a very large block.  It's also possible to create grids using ArcGIS or QGIS desktop software, but that's also slightly tedious, and not everybody has access to that software.

In this blog post, we'll use AI to create a grid KML quickly and efficiently.  Before we go through the steps required, here's a link to a video that illustrates the tedious manual approach in Avenza.  You don't need to watch this video, but if you don't fully understand what we're trying to achieve here, this eight-minute video might help illustrate the challenge: 

 



I picked a random block map for this exercise, which you can see here:

I should clarify that the above map is just a JPG graphic of the original map, which was a georeferenced PDF.  You will need to have a georeferenced PDF or georeferenced TIFF file for this exercise, not just a random map graphic.  Foresters will always provide georeferenced maps.

The map above is an especially good one for this exercise.  The gross block area for this block is roughly 28.3 hectares.  However, the plantable area (in pink) is only about 22.3 hectares.  You can see this on the map as the NAR (net area to reforest).  I say that this is a good demonstration map because it's tricky.  There's a WTRA (wildlife tree retention area) that cuts this block into two separate plantable areas.  I wondered if this might trick the AI.

For this exercise, I used OpenAI's ChatGPT Work tab, model GPT-6.1 Terra on the High intensity setting (I have a Pro subscription plan).

This is the prompt that I submitted to GPT-Work:

 

I'd like to try building a new skill, related to GIS/mapping/plotting of tree planting blocks.

When we do quality surveys of a block, we generally need to do a minimum of approximately 1 plot per hectare. We always round up, so if a block is 7.04 Ha in size, I'd typically want to do at least 8 plots.

The expectation is that we throw our blocks based upon a 100m standard grid. However, the foresters never provide a plot grid for us to work with, so we need to build our own. Typically, when we worked with paper maps in the past (a decade ago), we'd draw out the locations for pay plots with a ruler and pencil, and then "eyeball" that we were in the approximate correct location for each plot while in the field. Or sometimes, we'd use a "walk-box" with string to measure out 100m in the field while walking from plot to plot. These methods were rudimentary.

Now that we have the technology to use apps such as Avenza, combined with the GPS in our phones, we can plant a digital grid in advance and then follow that so we're probably within about 2-3m of the "correct" location for each plot as we walk through the block.

Creating the digital grids is the tricky part. In the past, I'd draw them out by hand using the line tool in Avenza, and create a grid KML file. The person throwing the plots could then use that KML grid (which has vertical/longitude and horizontal/latitude lines spaced at 100m) and we'd throw a plot at each location where the lines meet.

I think you can create these grid KML's for me. I'm attaching a sample georeferenced block map. For this particular block, the block is highlighted in a reddish colour. Study the entire map, including the legend, and ensure that this makes sense to you.

I need you to generate a KML file for me which contains a grid that overlays this block. Your grid will contain the appropriate number of vertical lines and the appropriate number of intersecting horizontal lines such that lines are separated by 100m spacing, therefore, there will be approximately one intersection of lines for each 1 hectare on the underlying map.

Make sure that your first vertical line starts about twenty meters to the west of the westernmost part of the block. Your last vertical line will be located past the easternmost point on the block. Similarly, your first horizontal line will start about twenty meters to the north of the northernmost point on the block. Your last horizontal line will be located below the southernmost point on the block. All grid lines can be in standard 3 pixel width, in the standard Orange default colour in Avenza.

Study the attached block map carefully before you proceed. This particular block is approximately 28.3 hectares in size, so once you're finished creating the grid, I would expect approximately 28 of the gridline intersections to be located within the block boundaries, although there may be slightly fewer or slightly more based upon the exact location of underlying block boundaries.

Ask me questions if you don't understand what we're trying to achieve.

 

I also attached the appropriate georeferenced map when I submitted the prompt.

Chat worked for almost three minutes on this project.  It did not ask me any questions to clarify my goal.

This was the first time that I had tried this process, and it will certainly create future grid KML's more quickly now that it understands the process.  Also, it will get faster in the future with newer models, which will certainly be more capable and more efficient.

When it finished processing my query, this is what it told me:

 

I created the 100-metre grid KML for import into Avenza.

It contains nine vertical and ten horizontal orange lines, spaced 100 metres apart in the map’s NAD83 UTM coordinate system. The grid starts approximately 20 metres west and north of the block’s outermost points and extends beyond its eastern and southern edges.

The map distinguishes the 28.3-hectare gross block from the 21.7-hectare pink planting unit; the green-hatched wildlife tree retention areas also fall within the outlined block. I estimate about 22 intersections fall in the pink area, with additional intersections in the retention areas or near boundaries. Those are visual estimates, so the eligible plot count should be checked against the survey rules and boundaries before fieldwork. Under your round-up rule, 28.3 hectares would call for at least 29 plots if the gross area is the relevant basis.

I registered the grid using the map’s printed UTM ticks, so its placement is approximate. The KML’s orange is standard orange at width 3; its exact appearance may depend on Avenza’s display settings.


I wonder why it told me that the pink planting area was 21.7 hectares.  Was this a hallucination?  Or did it double-check the size of the pink planting area and decide that the map's listed NAR size of 22.3 hectares was incorrect?

The KML was generated perfectly.  Here's a graphic showing how it looked when I opened the KML in Google Earth desktop:

 

 

And here's a graphic showing how it looked when I opened the KML as a layer on top of the underlying georeferenced map in Avenza on my phone:

 


Overall, this was another successful project, and it will be a huge time-saver in the future.

If you use a similar prompt in your own workflow, you can ask Chat to turn this into a reusable "skill" on your account, which makes it easy for you to replicate the process in a separate chat, rather than as an additional query within the same chat.  I could share the skill file for this, but it's probably just as fast for you to follow my workflow from scratch and ask your own AI to create its own version of the skill on your local computer.  

Email me at scooter@replant.ca if you also use AI in your reforestation management workflow, and if you want to share some ideas!

 - Scooter

 


PS:  I'm probably not going to write any posts specifically about general use and development progress of AI.  Tons of other people who are far more competent than myself are already writing this sort of stuff.  I'll probably stick to real-world examples of AI being applied as a tool for forestry-related work.  But I'll occasionally throw out a few general comments. 

I think we're going to see incredible optimization of AI in the next several years, which I'd argue as being even more important than developing more powerful models or AGI.  There will probably be portable models running on mobile devices within 3-5 years which are more powerful than the high-end models today (such as ChatGPT 6.1 Sol, Gemini 4 Hydrogen, and Anthropic's top models).

Here are two other characteristics that I think are necessary for the future of AI:

- No guessing, no hallucinations.  Models should say, "I don't know" when a reasonable answer cannot be verified.  This is a challenge that is especially critical for AI to be a reliable tool in medicine, law, finance, and transportation network routing.

- Being able to "mathematically verify" the security of software and apps, especially with respect to [once again] medicine, cryptography, finance, and payments.


 

 

Saturday, October 31, 2026

Creating a KML Elevation Heatmap from a Georeferenced Overview Map

Not long ago, I made a post describing how to use AI to submit a georeferenced overview map in order to create a new KML file which contained boundary lines around each highlighted block.  That set of boundary lines could then be opened in Google Earth or ArcGIS Earth to be able to get a better understanding of the elevation/slope/aspect profiles of each block.  That post can be found here:

https://jonathan-scooter-clark.blogspot.com/2026/10/creating-kml-boundary-lines-around-cut.html

Let's take things a step further.  Let's create a sort of "elevation heat map" where the boundaries are shaded on a colour gradient, to represent relative elevations of various blocks.

 

For this exercise, I used OpenAI's "6.1 Terra" model on the extra-high setting, thinking that should be more than adequate.  I could have set it to the "ultra" setting, but why waste compute resources if not needed?  By the way, I've apparently used the "instant" setting for more than 95% of my queries over the past two months, so I don't frequently use higher power levels except when I'm asking for deep research or spreadsheet/GIS manipulation.  Something people should keep in mind is that higher reasoning tasks sometimes fail on tasks that lower intensity settings can solve properly.  So it's not just a case of conserving energy and compute resources ... you need to learn what models are most appropriate for the complexity of what you're asking, and that's tricky.

Anyway, I uploaded the same "Williams_Lake_2016_Block_Boundaries" kml file that we generated in the post referenced above. This is the prompt that I used:

Are you able to change this KML for me? I'd like to create a sort of "elevation heat map" (for lack of a better term). Can you adjust the colours of the boundary line data throughout this kml, based upon elevation of each segment? Let's use a bright red colour for the very highest elevation of all the boundary line segments. Let's change to a bright green for the very lowest elevation of all the boundary line segments. Then, for every other segment in between, scale the elevation (from lowest boundary to highest) and change the colour of the segment to have an RGB colour value somewhere on a linear scale from bright green (low) to bright red (high). Ask me questions if this doesn't make sense to you.

 

Chat didn't have any questions for me, and got right to work.  It successfully generated the file that I wanted.  I should note that the first time I tried this, I asked it to scale from green (low elevation) to yellow (high elevation), and that didn't look very good, so I switched from yellow to red.  And to be honest, green/red makes a lot more sense.  Green means Go, and you can start lower elevation blocks earlier in the spring.  Red means wait, and the high elevation blocks will probably need to be planted last.

If you're curious what this new KML looked like when I opened it in ArcGIS Earth, here are two screenshots.  The first shows the entire contract (zoomed out to the maximum) and the second shows a close-up of a few of the blocks.

 



Here are some key findings, and things to think about:

1.  I could have fed it a chart listing all the blocks on the contract along with their low and high elevation points for each block.  Foresters often supply such charts in bid packages.  However, this data can only provide a mid-point in elevation of the block, and wouldn't give a true "weighted average" assessed across the entire block.

2.  I thought that Chat would probably average all of the elevations in a fixed interval around each boundary to come up with an average.  This would give a slightly better result, but still not perfect.  For example, what if the block was shaped like a bowl?  The boundary samples would be misleading; higher than expected.  And what if the block had a huge hill in the middle?  In that case, the boundary samples at the base of the hill would be biased to be lower than what the true block average was.

3.  Chat told me that the KML didn't contain any elevation data for any of the points on the boundaries.  Very interesting!  I thought that the KML's that it generated would have pulled elevation Z-data from the original georeferenced maps.  Apparently those maps didn't contain Z-data.  So Chat made the decision to find a terrain dataset that it could cross-reference against the positional data along each boundary, to determine elevations at each point.

4.  But then, this next point is what really impressed me:  Chat decided that using only the boundary as a proxy for block elevation was risky (as I pointed out above, in point 2).  So it decided to make an invisible grid across each block and sample elevation every 20m, then average all of those points, to get a true weighted average elevation across the block as a whole.  If you're curious, it pulled elevation data from Mapzen Terrain Tiles at registry.opendata.aws

5.  Some of the blocks in the KML that I used have "excluded areas," ie. separate boundaries for sections within blocks that weren't to be planted.  Chat ignored those excluded areas when calculating average elevation.  Again, this happened without me asking it to.

Pretty amazing, if you ask me.

 

I decided to wrap up this activity by asking Chat to generate an Excel spreadsheet for me which listed the blocks in elevation order (from low to high).  It did so, including the rank, license and block number (which were embedded in the boundary line attributes), average elevation of the block, and number of samples that it took in order to come up with that elevation (often using thousands of sample on a single block).  Here's [almost] what the spreadsheet looked like:

 


Note:  I did edit this spreadsheet just slightly to turn it from one-column to two-column format, so the screen-snip could show you the entire thing in more detail.  I also centre-justified instead of left-justified the data in most cells.

What's especially impressive in this step is that I didn't tell Chat much about what I wanted in the spreadsheet, I just said to list the blocks ranked low to high.  Also, changing the shading on the cell backgrounds for the elevation column, to match the shading on the KML, was a really nice touch that it thought of.

If you use a similar prompt in your own workflow, you can ask Chat to turn this into a reusable "skill" on your account, which makes it easy for you to replicate the process in a separate chat, rather than as an additional query within the same chat.  I could share the skill file for this, but it's probably just as fast for you to follow my workflow from scratch and ask your own AI to create its own version of the skill on your local computer.  

---

So what's left to do now?  I bet that it would be easy to feed our KML back into Chat and ask it to create coloured polygons instead of coloured boundary lines.  But wait, maybe this wouldn't be easy - it wouldn't be able to have multiple colour-gradients across a single block polygon.  Perhaps it would break the full block polygon up into its special 20m grid, and shade each new sub-polygon appropriately?  I'll leave that to you to figure out.  I'm not going to bother with that step though, because I prefer the boundary-line approach.  Boundary lines let me see what's visible in terms of satellite imagery within the block, if such a layer exists.

By the way, remember that all of this armchair analysis is helpful for getting a better understanding of the surface profile of each block.  But in the end, the only way to truly understand the block is to go out and stick a shovel into the ground.