Back to TomTom in Google Sheets
SheetXAI logo
TomTom logo
TomTom · Google Sheets Guide

Find POIs Within a Custom Geographic Boundary Defined in a Google Sheet

2026-05-15
5 min read

The Scenario

You're a market research analyst at a retail consultancy and your client has five custom trade areas — hand-drawn polygons representing each store's catchment zone. They want to know how many restaurants and hotels are inside each trade area, as a proxy for foot traffic intensity. The polygon coordinates are in a Google Sheet. TomTom's geometry-based POI search can answer the question. What you don't have is a way to query it from a spreadsheet.

The bad version:

  • Export the polygon coordinates for trade area 1, format them into the exact geometry structure TomTom's API requires (WKT or GeoJSON, depending on the endpoint), authenticate and make the API call, parse the paginated response, count the results, type the count into the sheet
  • Repeat four more times
  • Discover on trade area 3 that the polygon had a self-intersection that TomTom rejected, so you have to go back and clean the coordinates before retrying

The client presentation is Friday. You haven't started the actual analysis yet.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent that lives inside your Google Sheet. It reads the polygon definitions, calls TomTom's geometry-based POI search, and writes the results back into the sheet.

For the circular search area defined by the center lat/lng in cells A1 and B1 and radius in cell C1, find all TomTom POIs in the 'restaurant' category and write each one's name, address, and coordinates into this sheet

What You Get

  • One row per POI found within the boundary
  • Columns for name, formatted address, category, and lat/lng
  • A row count at the end so you can see the total without counting manually

What If the Data Is Not Quite Ready

Trade areas are polygons, not circles

Use the polygon coordinates in columns A and B of this sheet to define a geographic boundary, search for all TomTom POIs of type 'hotel' within it, and write the name, rating, and lat/lng of each result into a new tab

You need counts for multiple categories across multiple trade areas

For each of the 5 trade area center lat/lng pairs in the "Areas" tab columns A and B with radii in column C, search TomTom for restaurants, hotels, and coffee shops within each area. Write a summary row for each area in the "Results" tab showing area name and the count of each category.

Some polygon coordinates are in a single column as a JSON array

Parse the polygon coordinate arrays in column A, one per row, and for each one query TomTom for all POIs of category "parking" within the polygon. Write the count of results into column B and the name and distance from polygon centroid of the nearest parking POI into columns C and D.

Full trade area analysis with density scoring

For each trade area defined by center lat/lng in columns A and B and radius in column C, count TomTom restaurants within the area and write the count into column D, count hotels and write into column E, count coffee shops and write into column F. Calculate a density score as (D + E + F) divided by the area in km squared and write into column G. Highlight the top 2 areas by density score.

One prompt runs all five areas, counts all three categories, scores each area, and highlights the winners.

Try It

Get the 7-day free trial of SheetXAI and open the Google Sheet with your trade area boundaries, then ask it to count POIs within each one using TomTom. For scoring locations by POI proximity rather than containment, see the nearby POI enrichment spoke.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more