Region and county assignment: Difference between revisions

From Project-GC
Jump to navigation Jump to search
New page: how Project-GC assigns regions and counties
 
Add a map to each example
 
Line 72: Line 72:
== Examples ==
== Examples ==
These examples were checked in November 2026, with the posted coordinates shown for each. Geocaches can be moved and polygons can be updated, so Project-GC may place them differently later.
These examples were checked in November 2026, with the posted coordinates shown for each. Geocaches can be moved and polygons can be updated, so Project-GC may place them differently later.
In the maps, the colored areas are Project-GC's own polygons, drawn over a map from OpenStreetMap, and the red dot marks the posted coordinates.


=== GC256F: coordinates in another region ===
=== GC256F: coordinates in another region ===
[https://coord.info/GC256F GC256F] is listed in the region ''New York'' on Geocaching.com. Its posted coordinates, <code>N 41° 59.945' W 079° 45.726'</code>, are inside the polygon of the county ''Erie County (PA)'', which is in the region ''Pennsylvania''. Project-GC places it in ''Erie County (PA)'', and therefore in ''Pennsylvania''. The owner's choice of ''New York'' isn't used.
[https://coord.info/GC256F GC256F] is listed in the region ''New York'' on Geocaching.com. Its posted coordinates, <code>N 41° 59.945' W 079° 45.726'</code>, are inside the polygon of the county ''Erie County (PA)'', which is in the region ''Pennsylvania''. Project-GC places it in ''Erie County (PA)'', and therefore in ''Pennsylvania''. The owner's choice of ''New York'' isn't used.
<div style="display: inline-block; border: 1px solid #c8ccd1; background: #f8f9fa; padding: 4px 8px;">
[[File:Region and county assignment GC256F.png|800px|alt=Map of the posted coordinates of GC256F with New York, Pennsylvania and Erie County (PA)]]
* Orange: the region ''New York''
* Blue: the region ''Pennsylvania''
* Green: the county ''Erie County (PA)'', drawn on top of Pennsylvania
* Box in the top-left corner: a zoomed-in map of the area around the red dot
</div>


=== GC9P8RH: coordinates in another region, in Canada ===
=== GC9P8RH: coordinates in another region, in Canada ===
[https://coord.info/GC9P8RH GC9P8RH] is listed in the region ''Québec'' on Geocaching.com. Its posted coordinates, <code>N 45° 37.006' W 074° 35.810'</code>, are inside the polygon of the county ''Prescott and Russell'', which is in the region ''Ontario''. Project-GC places it in ''Prescott and Russell'', and therefore in ''Ontario''.
[https://coord.info/GC9P8RH GC9P8RH] is listed in the region ''Québec'' on Geocaching.com. Its posted coordinates, <code>N 45° 37.006' W 074° 35.810'</code>, are inside the polygon of the county ''Prescott and Russell'', which is in the region ''Ontario''. Project-GC places it in ''Prescott and Russell'', and therefore in ''Ontario''.
<div style="display: inline-block; border: 1px solid #c8ccd1; background: #f8f9fa; padding: 4px 8px;">
[[File:Region and county assignment GC9P8RH.png|800px|alt=Map of the posted coordinates of GC9P8RH with Québec, Ontario and Prescott and Russell]]
* Orange: the region ''Québec''
* Blue: the region ''Ontario''
* Green: the county ''Prescott and Russell'', drawn on top of Ontario
* Box in the top-left corner: a zoomed-in map of the area around the red dot
</div>


=== GC8A3A: coordinates in another country ===
=== GC8A3A: coordinates in another country ===
[https://coord.info/GC8A3A GC8A3A] is listed in the country ''United States'' and the region ''Ohio''. Its posted coordinates, <code>N 41° 40.609' W 082° 24.159'</code>, are in Lake Erie, on the Canadian side of the border. Only the polygons of the ''United States'' are searched, and none of them includes the coordinates. The nearest county, ''Erie County (OH)'', is about 30 m away (within 10 km), so Project-GC places the geocache in ''Erie County (OH)'', and therefore in the region ''Ohio''.
[https://coord.info/GC8A3A GC8A3A] is listed in the country ''United States'' and the region ''Ohio''. Its posted coordinates, <code>N 41° 40.609' W 082° 24.159'</code>, are in Lake Erie, on the Canadian side of the border. Only the polygons of the ''United States'' are searched, and none of them includes the coordinates. The nearest county, ''Erie County (OH)'', is about 30 m away (within 10 km), so Project-GC places the geocache in ''Erie County (OH)'', and therefore in the region ''Ohio''.
<div style="display: inline-block; border: 1px solid #c8ccd1; background: #f8f9fa; padding: 4px 8px;">
[[File:Region and county assignment GC8A3A.png|800px|alt=Map of the posted coordinates of GC8A3A with Canada, Ohio and Erie County (OH)]]
* Orange: the country ''Canada''
* Blue: the region ''Ohio''
* Green: the county ''Erie County (OH)'', drawn on top of Ohio
* Dashed red circle: 10 km from the red dot
* Box in the top-left corner: a zoomed-in map of the area around the red dot
</div>


=== GC6MCNH: too far from every polygon ===
=== GC6MCNH: too far from every polygon ===
[https://coord.info/GC6MCNH GC6MCNH] is listed in the country ''United States'' and the region ''North Carolina''. Its posted coordinates, <code>N 34° 11.330' W 076° 36.151'</code>, are in the Atlantic Ocean. The nearest county, ''Carteret County (NC)'', is about 38 km away, and so is the nearest region. Both are beyond 10 km, so the geocache gets no county, and the region its owner chose: ''North Carolina''.
[https://coord.info/GC6MCNH GC6MCNH] is listed in the country ''United States'' and the region ''North Carolina''. Its posted coordinates, <code>N 34° 11.330' W 076° 36.151'</code>, are in the Atlantic Ocean. The nearest county, ''Carteret County (NC)'', is about 38 km away, and so is the nearest region. Both are beyond 10 km, so the geocache gets no county, and the region its owner chose: ''North Carolina''.
<div style="display: inline-block; border: 1px solid #c8ccd1; background: #f8f9fa; padding: 4px 8px;">
[[File:Region and county assignment GC6MCNH.png|800px|alt=Map of the posted coordinates of GC6MCNH with the United States, North Carolina and Carteret County (NC)]]
* Purple: the country ''United States'', including its territorial waters
* Blue: the region ''North Carolina'', drawn on top of the United States
* Green: the county ''Carteret County (NC)'', drawn on top of North Carolina
* Dashed red circle: 10 km from the red dot
</div>


== See also ==
== See also ==

Latest revision as of 10:41, 26 November 2026

This page describes how Project-GC decides which country, region and county a geocache is in, and why they sometimes differ from what Geocaching.com shows.

In short: the country is always the one the geocache owner chose. The region and county are calculated from the geocache's posted coordinates, using boundary data from OpenStreetMap.

Countries, regions and counties

The three fit inside each other: a county is inside a region, and a region is inside a country.

"Region" and "county" are loose terms. Project-GC uses them for two levels of division within a country, whatever those are called there. For example:

  • In the United States, the regions are the states, plus the District of Columbia, which Geocaching.com lists as a state. The counties are the counties.
  • In Sweden, the regions are the län, which are called counties in English, and Project-GC's counties are the municipalities (kommuner).

Names

A region or county name is unique within its country, but the same name can exist in other countries. For counties, the name is unique in the whole country, not only within its region. When two counties in different regions of a country have the same name, the region is added to both names, as with Erie County (PA) and Erie County (OH) in the United States.

What Geocaching.com has

On Geocaching.com, every geocache has a country, chosen by its owner. In about 30 of Geocaching.com's roughly 250 countries, the owner also chooses a region, such as a state or a province. Geocaching.com has no counties.

What Project-GC has

Project-GC has boundary data, a polygon for each region and county, for the regions of about 240 countries and the counties of about 170 (end of 2026). Every country that has regions on Geocaching.com is among them. In those countries, Project-GC's regions are meant to have the same names as Geocaching.com's, and as of the end of 2026, they all do. GIS data describes where the data comes from.

  • In a country without region polygons, geocaches have no region. Geocaching.com has no regions in those countries either.
  • In a country without county polygons, geocaches have no county.

How it works

The country comes first, then the county. The region comes last, since it follows from the county.

Posted coordinates

Region and county are calculated from the geocache's posted coordinates, the ones shown on its page on Geocaching.com.

Many geocaches are not at their posted coordinates, for example most mysteries and multi-stage geocaches. Their region and county are still those of the posted coordinates, not of the final location. Corrected coordinates and additional waypoints are never used.

Country

The country is always the one the geocache owner chose on Geocaching.com. Project-GC never changes it, not even when the coordinates are in another country.

County

Project-GC looks up which of the country's county polygons the posted coordinates are inside. Only the counties of the geocache's own country are searched.

If the coordinates aren't inside any of them, Project-GC uses the nearest county of that country, as long as it's within 10 km. This is for geocaches in lakes, in the sea, or just across a border. Some county polygons include the water next to them and some don't, see Lakes and the sea.

If no county of the country is within 10 km, the geocache gets no county.

Region

If the geocache has a county, it gets the region that county is in. All geocaches in a county therefore get the same region, even where the region and county polygons don't line up exactly.

If the geocache has no county, Project-GC looks up which of the country's region polygons the coordinates are inside, with the same 10 km rule as for counties.

If no region polygon of the country is within 10 km either, the geocache gets the region its owner chose on Geocaching.com, if the country has regions there. Otherwise it gets no region.

Special cases

Coordinates in another country

Only the regions and counties of the country the owner chose are searched. A geocache listed in one country, with coordinates in a neighboring one, therefore never gets a region or county of the neighboring country.

Instead, it gets the nearest county and region of its own country, if they are within 10 km. Beyond that, it gets no county, and the region its owner chose on Geocaching.com, if the country has regions there.

Lakes and the sea

Whether the polygon of a region or county includes the water next to it depends on the source data in OpenStreetMap. It isn't Project-GC's choice. Some stop at the shoreline, others extend to the middle of a lake or to a national border in it. Practices differ between countries, sometimes between regions in the same country, and even between counties in the same region.

Project-GC doesn't treat water differently from land; it only looks at whether the coordinates are inside a polygon. A geocache in a lake is therefore in a county if that county's polygon includes the lake. If no polygon includes it, the 10 km rule applies, as for any other coordinates outside every polygon.

Borders that don't line up

Where two areas meet, the border is a single line in reality. In the source data, the polygons on each side don't always follow each other exactly. Along the border there can be small overlaps and gaps, from rounding, or because OpenStreetMap draws the two borders as separate lines that are close but not identical.

  • A gap between two regions, or between two counties: coordinates in the gap are outside every polygon, so the 10 km rule applies.
  • Two regions, or two counties, that overlap: coordinates in the overlap are inside both polygons, and the smaller polygon is used. An overlap should only ever be a small one along a border, but a larger one can be missed when the data is imported.
  • A region and a county that don't line up: a geocache near the border can be inside the county's polygon and, at the same time, inside the polygon of the neighboring region. Because of such mismatches, all geocaches in a county get the same region: the region that most of the county's geocaches are in. The mismatches only affect geocaches near the border, so most of the county's geocaches are in the region the county lies in.

Where Geocaching.com's region is used

Everywhere on Project-GC, the region is the one Project-GC calculates, with one exception: the PQ splitter uses the region the owner chose on Geocaching.com. That's the region Pocket Queries on Geocaching.com filter on.

When it is calculated

  • Region and county are calculated when Project-GC first fetches the geocache from Geocaching.com, and again whenever Project-GC detects that its coordinates have changed. Data synchronization describes how often geocaches are refreshed.
  • When the polygons of a country are updated, all geocaches in that country are recalculated. GIS data describes how and when that happens.

Examples

These examples were checked in November 2026, with the posted coordinates shown for each. Geocaches can be moved and polygons can be updated, so Project-GC may place them differently later.

In the maps, the colored areas are Project-GC's own polygons, drawn over a map from OpenStreetMap, and the red dot marks the posted coordinates.

GC256F: coordinates in another region

GC256F is listed in the region New York on Geocaching.com. Its posted coordinates, N 41° 59.945' W 079° 45.726', are inside the polygon of the county Erie County (PA), which is in the region Pennsylvania. Project-GC places it in Erie County (PA), and therefore in Pennsylvania. The owner's choice of New York isn't used.

Map of the posted coordinates of GC256F with New York, Pennsylvania and Erie County (PA)

  • Orange: the region New York
  • Blue: the region Pennsylvania
  • Green: the county Erie County (PA), drawn on top of Pennsylvania
  • Box in the top-left corner: a zoomed-in map of the area around the red dot

GC9P8RH: coordinates in another region, in Canada

GC9P8RH is listed in the region Québec on Geocaching.com. Its posted coordinates, N 45° 37.006' W 074° 35.810', are inside the polygon of the county Prescott and Russell, which is in the region Ontario. Project-GC places it in Prescott and Russell, and therefore in Ontario.

Map of the posted coordinates of GC9P8RH with Québec, Ontario and Prescott and Russell

  • Orange: the region Québec
  • Blue: the region Ontario
  • Green: the county Prescott and Russell, drawn on top of Ontario
  • Box in the top-left corner: a zoomed-in map of the area around the red dot

GC8A3A: coordinates in another country

GC8A3A is listed in the country United States and the region Ohio. Its posted coordinates, N 41° 40.609' W 082° 24.159', are in Lake Erie, on the Canadian side of the border. Only the polygons of the United States are searched, and none of them includes the coordinates. The nearest county, Erie County (OH), is about 30 m away (within 10 km), so Project-GC places the geocache in Erie County (OH), and therefore in the region Ohio.

Map of the posted coordinates of GC8A3A with Canada, Ohio and Erie County (OH)

  • Orange: the country Canada
  • Blue: the region Ohio
  • Green: the county Erie County (OH), drawn on top of Ohio
  • Dashed red circle: 10 km from the red dot
  • Box in the top-left corner: a zoomed-in map of the area around the red dot

GC6MCNH: too far from every polygon

GC6MCNH is listed in the country United States and the region North Carolina. Its posted coordinates, N 34° 11.330' W 076° 36.151', are in the Atlantic Ocean. The nearest county, Carteret County (NC), is about 38 km away, and so is the nearest region. Both are beyond 10 km, so the geocache gets no county, and the region its owner chose: North Carolina.

Map of the posted coordinates of GC6MCNH with the United States, North Carolina and Carteret County (NC)

  • Purple: the country United States, including its territorial waters
  • Blue: the region North Carolina, drawn on top of the United States
  • Green: the county Carteret County (NC), drawn on top of North Carolina
  • Dashed red circle: 10 km from the red dot

See also