skillfed

global-land-mask

Check whether a lat/lon point in on land or on sea

global-land-mask v1.0.0 76.1K downloads/30d#14,653 on PyPI121
Permissive license Abandoned released

What it is and what it does

global-land-mask provides a fast lookup function to classify any latitude/longitude point on Earth as land or ocean. It uses a precomputed binary mask derived from the GLOBE elevation dataset, which covers the entire planet at 1 km resolution and is compressed to about 2.5 MB. The package exports two main functions: globe.is_land() and globe.is_ocean(), both of which accept scalar or array inputs for batch queries.

The primary use case is rapid geolocation classification in data pipelines, geospatial analysis, or mapping applications. The documentation indicates significant performance advantages for bulk queries. The package treats lakes as land and acknowledges that resolution is not perfect, but is adequate for many practical purposes.

Use it for:

  • Filter geographic datasets to include only land-based or ocean-based points before further processing
  • Validate or enrich location data in applications that need to classify user coordinates
  • Prepare training data for geospatial analysis by labeling points as land or sea
  • Generate visualizations or heatmaps that require fast land/ocean classification across grids

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Determines whether geographic coordinates (latitude/longitude) fall on land or ocean using a compressed global elevation dataset at 1 km resolution.

Yes, if you need fast land/ocean classification and can tolerate that the package is no longer maintained. The permissive MIT license and low install friction make it low-risk to add. However, verify that 1 km resolution and the specific treatment of lakes and coastlines match your accuracy requirements before committing to it in production.

Install

global-land-mask on PyPI

pip

pip install global-land-mask

uv

uv add global-land-mask

poetry

poetry add global-land-mask

Installing global-land-mask

Before you install

Low friction installation with no runtime dependencies. Package is abandoned as of 2022 with no recent maintenance, so expect no bug fixes or updates.

License in practice

MIT license permits commercial and private use with minimal restrictions, making it safe to integrate into most projects.

Quickstart

pip install global-land-mask

from global_land_mask import globe

lat, lon = 40, -120
is_on_land = globe.is_land(lat, lon)
print(is_on_land)

Verify before relying

  • Whether the precompiled land mask data is included in the wheel or downloaded on first use
  • Current accuracy compared to other land/sea datasets or whether 1 km resolution is sufficient for your use case
  • Whether numpy is actually required at runtime or only for data generation

Package facts

License not declared (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance abandoned — 2,139 days since the last release
Last repo commit
First released
Downloads 76,134/month — #14,653 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: global_land_mask-1.0.0-py3-none-any.whl

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

lat lon land ocean checkgeographic coordinate land seaglobal land mask lookuppoint on land detectionearth surface classificationlatitude longitude land query
geospatialland-sea-classification

More Scientific/Engineering packages