Showing posts with label block. Show all posts
Showing posts with label block. Show all posts

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 24, 2026

Using AI to create Polygons & Caches before Planting a Block

If you're a crew leader, you're probably very accustomed to the tedious task of creating a number of polygons on a block before planting, then calculating how many trees are needed for each polygon, then creating pins for caches with data attached to the pins to show the size of the piece and the predicted number of trees.  It's a fun task, until you've done a few hundred blocks.  Then it gets to be tedious and boring.

What if you could automate this task?  And even better, have KML files generated for you that match your traditional style for cutting up blocks?

This is my suggestion (I haven't tried this yet):

1.  First, collect block maps from about two dozen different sources.  Don't collect them all from a single contract/source, because having a variety of underlying map designs will help improve the skill of your model when running into new designs.

2.  Next, decide on your "parameters" or preferences & limits.  For example, I might decide:  (a) No polygons smaller than 1200 trees; (b) No polygons larger than 4600 trees; (c) Make sure that 60% of polygons are between 1800 and 3600 trees, with 20% between 1200 and 1800 and 20% between 3600 and 4600; (d) If the map has a prescription that indicates multiple species, ignore that and simply calculate the number of trees for each piece, based upon the size of the polygon in hectares multiplied by the target density in stems/hectare.

3.  Spend a few hours creating sets of polygons which roughly follow the above rules, going through one block map at a time and manually creating polygons.

4.  Create caches based on where you think the best locations are.  Use some sort of standard naming convention for cache pins, ie. the Aviation alphabet, a numbering system, etc.  For each pin, include the metadata in the label which includes the size of the piece (polygon), the target density, and the trees required for the piece.

Once you have all of these set up, go into your AI (such as Work if you're subscribed to OpenAI, Co-Work if you're subscribed to Claude, or Spark if you're subscribed to Gemini).  Tell it that you want it to learn your preferences for generating polygon and cache pin data from block maps, and that you're going to feed it a few dozen examples of KML files that you created based upon studying specific block maps.  Tell the AI that you don't want it to analyze yet, but you're going to feed in all the maps and KML's first.  Make sure that the file names are designed in a way to ensure that the AI correlates them properly, ie. "Block 01 map.pdf" and "Block 01 layout.kml"

 


 

After Work has all of the files, ask it to correlate all block maps with the relevant KML's that you created, and analyze your patterns in creating polygon layers, because you want it to be able to do the same thing in the future.

Once it has analyzed all of your files, give it a fresh map and ask it to create a block layout kml for that block, with a specific set of preferences for that exact block (which may vary slightly from what you were mentally aiming for above).  As an example, use this prompt:

Now that you see the patterns that I use when creating Planting Piece Layout KML's, I want to give you a new block map and have you create a layout for me.  Keep the following rules and preferences in mind:

1.  Rule - polygons must cover the entire block, and must not overlap each other.

2.  Rule - the target density for this block is XXXX stems per hectare. 

3.  Rule - no pieces/polygons can be smaller in size than that which would create a 1200-tree piece, based upon the target density that I just provided.

4.  Rule - no pieces/polygons can be larger in size than that which would create a 4400-tree piece, based upon the target density that I just provided.

5.  Rule - for each polygon that you create, name the polygon according to a series starting with "Piece 01," then "Piece 02" and so on.  In addition, the size of the piece (in hectares) and the number of trees required (at the target density) should be included in the name of each polygon.

6.  Rule - for each Cache that you create, add a name using the aviation alphabet going through in sequence, ie. the first cache should be called Alpha, the second cache should be called Bravo, etc.  In addition to the Cache name, the name of the pin should include which polygons it services, and the total number of trees required, ie. "Alpha, services pieces 07 and 11, needs 7,941 trees."

7.  Rule - cache pins can only be created along the border of a piece.  In addition, cache pieces should always be located on a road or trail.

8.  Preference - I'd like approximately 20% of the polygons to range between 1200 and 1800 trees in size, approximately 60% of the polygons to range between 1801 and 3600 trees in size, and approximately 20% of the polygons to range between 3601 and 4400 trees in size.

Now this is starting to get complicated.  I'm approaching this concept theoretically, without having tried it yet.

Hold these thoughts.  I'm going to have to create a set of block maps and piece layers myself, and see how the AI model responds.  I'll do all the layers on my next cross-country flight in early November.

I'll revisit this post as soon as I get this done.  I'm also thinking that instead of turning this into a Skill, maybe I can take this even further and develop a standalone app that lets a user submit a map, and then the app creates a suggested block layout.