ADINT / by Trihelix
Trihelix AI team Published · Updated

Tutorial

Check a Planned Geofence Against the GRLD List

A spreadsheet check that compares a planned advertising geofence, its center plus radius, against the corner coordinates in Table 1 of 28 CFR 202.1401, flags listed areas that come too close, and documents the result in the campaign file.

Time needed: About 45 minutes

Before you start:

  • The latitude, longitude, and radius of each geofence you plan to run
  • A spreadsheet application (Excel, Google Sheets, or LibreOffice Calc)
  • A browser with access to the official eCFR text of 28 CFR 202.1401

Grld Geolocation Compliance Data Security Program

If a campaign plan includes a geofence — around a venue, a retail corridor, an event site — one pre-launch check is whether that fence comes close to any area on the Government-Related Location Data List (the GRLD List), Table 1 to 28 CFR 202.1401. Under the Department of Justice’s Data Security Program (DSP), precise geolocation data for a location inside a listed area counts as government-related data. The definition at 28 CFR 202.222 sets no minimum volume: data from a single device inside a listed area qualifies. Covered transactions that would put that data within reach of a country of concern — or of a covered person — are prohibited or restricted.

This tutorial builds the check in a spreadsheet — no GIS software, no code. You will compare the center of each planned geofence against every coordinate the list publishes, flag anything close, and write the result into the campaign file.

Flow diagram of the check: a planned geofence's center and radius are compared in a spreadsheet against the Area ID corner coordinates from Table 1 of 28 CFR 202.1401; any listed corner inside the radius plus a safety margin is flagged, recorded, and routed to compliance and counsel, and a check with no flag is recorded in the campaign file.

What the list actually looks like

Read the table before you build anything, because its shape decides the method. Section 202.1401 opens with one sentence: “For each Area ID listed in this section, each of the latitude/longitude coordinate pairs forms a corner of the geofenced area.”

Table 1 has two column groups:

  • Area ID — a plain number identifying the listed area.
  • Latitude/longitude coordinates of geofenced areas — four coordinate pairs per row.

So each row is a four-corner polygon, not a center point with a published radius. The table gives coordinates only — no site names, no street addresses. Coordinates are in decimal degrees; longitudes west of Greenwich are negative, and a few rows (for example, Guam) carry positive longitudes. Because the list publishes corners, the practical spreadsheet check is a distance screen: measure from your geofence’s center to every corner of every row, and flag any corner that falls inside your fence, expanded by a safety margin. The limits of that screen are stated plainly at the end of this tutorial — read them before you treat a clean result as final.

Steps

1. Open the official list and note its currency date

Go to the eCFR text of 28 CFR 202.1401. At the top, the page states the date its text is current through (“Displaying title 28, up to date as of …”). Write that date down — it goes into your campaign-file record in step 5, because it identifies the version of the list you checked against. Scroll through Table 1 and confirm the structure above: one Area ID and four latitude/longitude pairs per row.

2. Copy Table 1 into a spreadsheet and split the pairs

Create a sheet named List. Select Table 1 on the eCFR page, copy it, and paste it into cell A1. You should get the Area ID in column A and one coordinate pair per cell in columns B through E, each cell holding text like 38.935624, -77.207888.

Two cleanups before any math:

  1. Fix the minus signs. The eCFR page uses a typographic minus sign (−) that spreadsheets do not read as a negative number. Select columns B through E, open Find & Replace, and replace that character with an ordinary hyphen (-). Copy one minus sign from a pasted cell into the Find field so you match the exact character.
  2. Split each pair into separate latitude and longitude numbers. Add eight helper columns, F through M. In F2, extract corner 1’s latitude from the pair in B2:
=VALUE(TRIM(LEFT($B2,FIND(",",$B2)-1)))

In G2, extract corner 1’s longitude:

=VALUE(TRIM(MID($B2,FIND(",",$B2)+1,30)))

Repeat the same pair of formulas for corners 2–4, reading from C2, D2, and E2 into columns H–I, J–K, and L–M. Fill all eight columns down to the last row. Spot-check a few rows against the eCFR page: the numbers in F through M must match the published pairs exactly, signs included.

3. Enter your planned geofences

Create a second sheet named Planned, with one row per geofence:

  1. A — Geofence name (your campaign’s own label)
  2. B — Center latitude, decimal degrees
  3. C — Center longitude, decimal degrees (negative for western longitudes, matching the table’s convention)
  4. D — Radius, in meters
  5. E — Safety margin, in meters — the extra distance beyond your radius that you still want flagged, to absorb platform rounding and the screen’s limits

Everything in this check runs in meters. If your platform specifies a geofence radius in miles or feet, convert it to meters before you type it in column D. Run one copy of the check per planned geofence: duplicate the List sheet for each additional geofence and point its formulas (next step) at that geofence’s row on the Planned sheet.

4. Compute the distance from your center to every listed corner

Back on the List sheet, add four distance columns, N through Q — one per corner. In N2, compute the distance in meters from your planned center to corner 1, whose latitude and longitude now sit in F2 and G2:

=2*6371000*ASIN(MIN(1,SQRT(SIN(RADIANS(($F2-Planned!$B$2)/2))^2+COS(RADIANS(Planned!$B$2))*COS(RADIANS($F2))*SIN(RADIANS(($G2-Planned!$C$2)/2))^2)))

This is the haversine formula. Its inputs:

  • 6371000 — Earth’s mean radius in meters, which is why the result comes out in meters.
  • Planned!$B$2 and Planned!$C$2 — your geofence’s center latitude and longitude. The $ signs lock these cells, so the reference stays on your center as the formula fills down hundreds of rows.
  • $F2 and $G2 — the corner’s latitude and longitude. These move row by row, so each row measures against that row’s corner.
  • RADIANS(…) — converts decimal degrees to radians, which the SIN, COS, and ASIN functions require.
  • MIN(1, …) — a rounding guard. For a corner identical to your center, floating-point arithmetic can push the value under ASIN a hair above 1 and produce an error; the guard caps it.

Build O2, P2, and Q2 the same way, substituting the corner 2, 3, and 4 columns (H–I, J–K, L–M) for F–G. Fill N through Q down every row. Then add column R, the closest corner for that area:

=MIN(N2:Q2)

5. Flag close areas and record the check

Add column S, the flag:

=IF(R2<=Planned!$D$2+Planned!$E$2,"FLAG","")

A row flags when its closest corner falls within your radius plus your safety margin. Sort the sheet by column R, smallest first, and review the top of the list — not just the rows marked FLAG. Results just above the threshold deserve the same look as results just below it.

Now record the check in the campaign file. Write down:

  • The date you ran the check, and the eCFR currency date you noted in step 1
  • Who ran it
  • Each planned geofence checked (name, center, radius, margin)
  • Every flagged Area ID, with its closest-corner distance from column R
  • The disposition of each flag (what happened next, per step 6)

Keep the spreadsheet itself with the record. The habit aligns with the DSP’s own paperwork expectations: § 202.1101 requires U.S. persons engaging in a transaction subject to the program to keep a full and accurate record of it, available for examination for at least 10 years after the transaction.

6. Read a flag correctly before you act on it

A flag means one narrow thing: a corner of a listed area falls inside your planned fence, expanded by your margin. Treat it as a routing signal, not a verdict.

What a flag does not mean: It is not a ban on advertising near the listed place. The DSP does not regulate ad placement; it regulates covered data transactions — data brokerage, and vendor, employment, and investment agreements — through which government-related data could end up with the governments and persons the program restricts. The listed areas are not universal no-advertising zones, and a flag on its own does not establish that your campaign is a covered data transaction.

What a flag does mean: Precise geolocation data originating inside that listed area is government-related data under the DSP, regardless of volume. So the real question a flag raises is about data flow: could your stack — the platform, exchange, SDKs, pixels, and measurement vendors behind this campaign — put precise geolocation data from inside the listed area within reach of a covered person, or of a government the program names? That is a question for your compliance team or counsel, with the check record from step 5 in hand, before the campaign launches.

What no flag means: Only that, on the day you checked, no published corner fell within your threshold in a center-point screen. It is not a legal clearance — read the limits below.

Try it now: the geofence screen lab runs steps 4 and 5 in your browser on invented area rows, including the control test. Nothing leaves the page, unless you accepted the site’s analytics, which can record part of a field you click and text you copy. A flag is a routing signal for compliance and counsel, not a verdict.

Check your result

  • Run a control. Add a test row to Planned whose center is copied exactly from one listed corner (take both numbers from columns F and G of any row). The distance to that corner must compute as 0 and the row must flag. Delete the test row when it passes.
  • Scan for errors. Columns N through S should contain no #VALUE! or #NUM!. A #VALUE! usually means a pair that never got split, or a typographic minus sign that survived step 2.
  • Verify one distance on a map. Plot your planned center and the closest flagged (or nearest unflagged) corner in any mapping tool and compare its measured distance with column R. Expect close agreement, not an exact match — mapping tools round.
  • Count the rows. The number of data rows on your List sheet must equal the number of Area ID rows in Table 1. If your sheet has fewer, the copy dropped rows and the check is incomplete.

Mistakes and limits

  • Stale lists. The CFR text changes through rulemaking, and the eCFR page moves with it. That is why step 1 records the currency date: re-run this check against the current text for each new campaign instead of reusing an old spreadsheet.
  • A center-point screen is not polygon math. This check can miss an overlap in two situations: your fence crosses a listed area’s edge without containing any of its corners, and your center sits inside one of the larger listed areas whose four corners all lie beyond your threshold. The safety margin shrinks both misses; it does not eliminate them. Treat near-threshold results as flags, and let compliance decide close calls.
  • Formula choice. The shorter spherical law-of-cosines formula (built on ACOS) can lose precision at short distances and report small distances inaccurately. The haversine form in step 4 is the safer default for this check.
  • Sign and unit errors. Western-hemisphere longitudes are negative in Table 1; a dropped minus sign moves a corner to the wrong side of the world, and the distance column will show an implausibly large number. Read implausible values as a data error, not a result. Likewise, a radius entered in feet or miles without conversion silently shrinks or inflates every flag.
  • Scope. This check covers one list and one question. Part 202 also reaches other categories of sensitive personal data and other transaction types, which this tutorial does not assess. This is general information about a public regulation, not legal advice for a specific campaign.

This tutorial explains a public regulation in general terms; it is not legal advice for any specific campaign.

Sources