Back to How-To
How-To

Convert Legal Land Descriptions in Google Sheets — Township Canada

Convert DLS, LSD, and NTS legal land descriptions to GPS coordinates directly in Google Sheets using the Township Canada add-on or custom formulas.

How to Convert Legal Land Descriptions in Google Sheets

You have a column of legal land descriptions in a Google Sheet — quarter sections from a land sale, LSDs from well licence applications, or NTS references from a BC field program. You need GPS coordinates next to each one. Copying and pasting them into a converter one at a time is not realistic when you have 50, 200, or 1,000 rows.

Township Canada's Google Sheets add-on puts a conversion formula directly in your spreadsheet. Type =TOWNSHIP("NW-25-024-01W5") in a cell and get GPS coordinates back without leaving the sheet.

What You'll Learn

This guide covers two ways to convert legal land descriptions to GPS coordinates in Google Sheets: the Township Canada add-on (fastest) and a custom Apps Script function using the Township Canada API. Both methods work with DLS, LSD, NTS, Geographic Township, and River Lot descriptions.

Option 1: Township Canada Google Sheets Add-On

The add-on is available on the Google Workspace Marketplace. Once installed, it adds custom spreadsheet functions that call the Township Canada API behind the scenes.

Step 1: Install the Add-On

Open your Google Sheet, go to Extensions → Add-ons → Get add-ons, and search for "Township Canada." Click Install and grant the required permissions. The add-on includes 10 free conversions per month — connect a Township Canada API key in the Settings dialog for unlimited use on any API plan.

Step 2: Use the Formula

In any empty cell next to a legal land description, type:

=TOWNSHIP("NW-25-024-01W5")

This returns the full GPS coordinate string. For individual fields, use:

  • =TOWNSHIP_LAT("NW-25-024-01W5") — returns latitude only
  • =TOWNSHIP_LNG("NW-25-024-01W5") — returns longitude only
  • =TOWNSHIP_PROVINCE("NW-25-024-01W5") — returns the province

You can also reference another cell: =TOWNSHIP(A2) pulls the description from cell A2, so you can drag the formula down a column to convert an entire list.

Step 3: Batch Convert with the Sidebar

For larger jobs — say 200 legal land descriptions from a crop insurance claim list — open the add-on sidebar from Extensions → Township Canada → Open Sidebar. Select the cell range containing your descriptions, click Convert, and the sidebar processes the batch with a progress indicator. Results fill into adjacent columns automatically.

Option 2: Apps Script with the Township Canada API

If you prefer direct API access or need more control over the output, you can write a short Apps Script function. This approach is useful for teams that already have a Township Canada API key and want to embed conversion into existing spreadsheet workflows.

Step 1: Open the Script Editor

In your Google Sheet, go to Extensions → Apps Script. This opens a code editor attached to your spreadsheet.

Step 2: Add the Conversion Function

Paste this function into the editor:

function CONVERT_LLD(description) {
  var apiKey = PropertiesService.getScriptProperties().getProperty('TC_API_KEY');
  var url = 'https://api.townshipcanada.com/v1/search?q=' + encodeURIComponent(description);
  var options = { headers: { 'X-API-Key': apiKey } };
  var response = UrlFetchApp.fetch(url, options);
  var data = JSON.parse(response.getContentText());
  if (data.features && data.features.length > 0) {
    var coords = data.features[0].geometry.coordinates;
    return coords[1] + ', ' + coords[0];
  }
  return 'Not found';
}

Step 3: Set Your API Key

In the Apps Script editor, go to Project Settings → Script Properties and add a property named TC_API_KEY with your Township Canada API key as the value. API keys start at $20/month on the Build plan — see API pricing for details.

Step 4: Use It in Your Sheet

Back in the spreadsheet, type =CONVERT_LLD(A2) in any cell. Google Sheets calls the function, hits the API, and returns the coordinates. Drag the formula down to convert multiple rows.

Note: Apps Script has a quota on external URL fetches — roughly 20,000 calls per day on a standard Google Workspace account. For lists over a few hundred rows, the add-on's sidebar batch converter is more efficient because it groups requests.

Example: Converting a List of Alberta Quarter Sections

A land agent receives a list of 15 quarter sections from a real estate portfolio review. The spreadsheet looks like this:

A (Legal Description)B (Latitude)C (Longitude)
NW-25-024-01W5
SE-12-030-04W5
NE-33-048-07W5

After entering =TOWNSHIP_LAT(A2) in B2 and =TOWNSHIP_LNG(A2) in C2, then dragging both formulas down, every row has GPS coordinates within seconds. The agent can now sort by location, plot them on a map, or filter by region — all without leaving the spreadsheet.

For larger datasets — hundreds or thousands of rows — the batch conversion tool accepts CSV uploads directly and returns results in multiple export formats including KML, Shapefile, and GeoJSON.

Common Mistakes to Avoid

Formatting errors: Google Sheets sometimes auto-formats legal land descriptions. A value like 06-32-048-07W5 may get interpreted as a date or number. Format the column as Plain Text before entering descriptions to prevent this.

Missing meridian: DLS descriptions require a meridian reference (W4, W5, W6). A description like NE-14-032-21 without a meridian suffix won't resolve. Always include the full description — for example, NE-14-032-21W4. See the township, range, and meridian guide for details on how the meridian system works.

Mixed systems in one column: The add-on handles mixed survey systems — DLS, NTS, Geographic Townships — in the same column. You don't need to separate them into different sheets. Just make sure each cell contains a single, complete legal land description.

Try It Yourself

Install the Township Canada Google Sheets add-on and convert your first legal land description. Or paste a description into the converter on the homepage to see it work before installing anything.