Showing posts with label avenza. Show all posts
Showing posts with label avenza. Show all posts

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.

 

 

 

Thursday, October 11, 2018

Backroad Mapbooks for Tree Planters

A lot of tree planters like to use the Avenza GPS/mapping app for finding their way around in the bush.  The Avenza app is free to download and use (three simultaneous maps at a time maximum with the free version, unlimited maps with the annual subscription), and it is available for both Android and iOS devices.  It's also very easy to use.

Typically, planters get maps from foresters, or from their camp supervisor, or shared online for free.  The only maps that work in this app are ones that are set up as "georeferenced" maps.  The file format for these maps is generally a PDF or a TIFF, and if the map is georeferenced, that means that it has latitude and longitude info embedded into the file.  When combined with a device that contains a GPS (ie. all modern smart phones, and any modern cell-connected tablet), a user can load a georeferenced map into the Avenza app, and when the map is displayed on the screen, your location "on the map" is shown as a blue dot, similar to the blue dot that you see in Google Maps.  Of course, in order to see that blue dot, your device also needs to be physically located within the geographic area displayed on the map.

For the past few years, I've shared a collection of a few georeferenced forestry overview maps on my public dropbox account, so planters (in BC) can experiment with using the app.  I have about a dozen different maps there, and each can be downloaded and used by anyone who knows the link.  There are maps for Burns Lake, Fort St James, Kamloops, Lillooet, Mackenzie, Merritt, Prince George, Quesnel, Smithers, Valemont, and Williams Lake.  To find them, first go to my public dropbox at this link:

www.djbolivia.ca/dropbox


Once you're there, go into the Canadian Reforestation folder, then go into the BC Overview Maps folder, and help yourself to whatever you want.

The only problem with these maps is that each one was made by a different forester, using different layers and GIS data, and many of them don't even show publicly-maintained roads, let alone the forestry roads and back trails that many of us like to explore.  There's no consistency, and many of them are fairly poor when it comes to navigation, except in a very broad sense.  Well, look no further, there's an easy solution:

www.backroadmapbooks.com/avenza


On the Backroad Mapbooks site, you can find a number of commercial map packages (for Canada) that can be purchased, downloaded, and loaded into the Avenza maps application.




There are a number of different regions available for purchase.  Within BC, for example, there are approximately six different regions.  I guess this is a drawback if you are exploring all over the province, but since many of us tend to stick to one or two regions, it's not a real problem.  Also, each package is so cheap ($19.95 USD) that it doesn't hurt to have to buy a couple of regions.  There are additional packages which cover the rest of Canada.  Of course, some other regions are not as geographically diverse as BC, so for example, a single package covers all of New Brunswick and PEI, and another covers all of Nova Scotia and PEI.  PEI gets to be included in two different packages because it's so small.  "Hey bus driver, can this bus stop on a dime?  I hope so, because we're coming up to PEI!"  Ok, PEI is a wonderful province, and before I get off onto a rant about Greyhound, let's get back to the topic at hand.

These maps are great.  However, when you buy them to use with Avenza, make sure you select the digital version, not a print mapbook!  You can then pay for the download with a credit card or PayPal, and a few seconds later, the mapbook is available in your Avenza Map Store account.  Yes, you needed to create an account on the Avenza Map Store, if you didn't already have one.  This only takes a couple minutes, and as much as I hate creating new accounts everywhere, this is quite beneficial.  You see, you can log into your account from multiple devices.  So for example, you can buy the Northern BC mapbook package on your PC, then log into your account on both your phone and tablet, and the maps will be available for both devices.  This is really helpful.  When I go exploring, I usually have my tablet mounted on my windshield, for hands-free navigation.  But if I jump out of the truck to take a few photos, I like to do it with my phone, because the camera on my phone has better resolution and more storage.  When I'm about to take a photo, I can drop an Avenza pin on my Backroads Map to show where I took it, then take the photo within the pin for later reference.  Your purchases stay in your account permanently, so even if you drop your phone into a toilet three years from now and end up installing Avenza on the new Samsung Galaxy S14, you'll still be able to access your maps.

Here's a screenshot to show some of the Northern BC maps loaded up into my phone.  This particular package contains 112 separate maps (a 775MB download, so do it while you're still in WiFi coverage at home):



Here's a screenshot showing me sitting in Prince George (I'm the blue dot).  This map is zoomed in to its maximum extent at the moment, but even so, the resolution is still usable.



Here's another screenshot, zoomed out slightly more, but still showing a small fraction of the Prince George map.



As you can see, the detail is pretty good, and considering that some of the BCTS and MOF overview maps lack much attention to detail (ie. roads), it can be handy to flip back and forth from your government forestry overview maps to the Backroads Maps while navigating.  These Backroad Mapbook maps do have a fair number of logging roads and goat trails on them, even small side branches.

To be clear, you do NOT need to be in cell service for the location-finding on these maps to work.  The "blue dot" magic happens because your device reads GPS signals from GPS satellites even when you're in remote locations, far from cell coverage.

Good luck with your exploring!