Blog·Craft·

Lakes and rivers still resolve

A point on inland water can still have a country and state. The lookup follows administrative boundaries, not just dry land.

A point on Lake Norman is still in North Carolina. If you're recording a boat trip or a reading from a sensor on the lake, losing the state just because the coordinate is wet would be an odd result.

These are the location fields from GET /point?lat=35.62&lon=-80.95:

{
  "latitude": 35.62,
  "longitude": -80.95,
  "country": "US",
  "country_name": "United States",
  "state": "NC",
  "state_name": "North Carolina"
}

/point checks the administrative boundaries that contain the coordinate. It doesn't reject a point simply because it's on water, so a lake or river inside those boundaries can resolve just like a point on land.

A river can divide two countries, and a lake can cross a state boundary. The answer comes from administrative boundary data, so a small change in coordinates near a border can change which place is returned.

Open ocean commonly returns null place fields. Null can also mean a boundary lookup couldn't supply an answer, so don't use it as a test for water. This endpoint answers where the point belongs administratively. It doesn't classify every wet and dry surface.