Skip to main content

ease_lonlat

Small package to convert given geographic coordinates (longitude, latitude) to EASE(2)-grid coordinates (col, row) and vice versa.

This code is inspired by the 'easeconv-0.3' software, the EASE-Grid map transformation utilities Developed and distributed by the National Snow & Ice Data Center (NSIDC), University of Colorado at Boulder. But instead of defining projections and grids "from a scratch", the pyproj library and definition of grids from NSIDC have been used.


MOTIVATION

Get SMOS (CATDS, 25km, global projection) row and col coordinates corresponding to the pixel of EASE2 grid with given lon-lat coordinates.


SUPPORTED GRIDS

'N' stands for North Polar (Lambert's equal-area, azimuthal), 'S' for South Polar (Lambert's equal-area, azimuthal) and 'G' for Global (cylindrical, equal-area) projection. 3125km means pixel size of 3.125 km, 625 means 6.25 km and 125 means 12.5 km.

  • EASE2_G1km
  • EASE2_G3km, EASE2_N3km, EASE2_S3km
  • EASE2_G3125km, EASE2_N3125km, EASE2_S3125km
  • EASE2_G625km, EASE2_N625km, EASE2_S625km
  • EASE2_G9km, EASE2_N9km, EASE2_S9km
  • EASE2_G125km, EASE2_N125km, EASE2_S125km
  • EASE_G125km, EASE_N125km, EASE_S125km
  • EASE2_G25km, EASE2_N25km, EASE2_S25km
  • EASE_G25km, EASE_N25km, EASE_S25km
  • EASE2_G36km, EASE2_N36km, EASE2_S36km

TESTED GRIDS

Tested on SMAP data. EASE2-grids - 9km (N, S, G), 36km (N, G).

NOT TESTED GRIDS

If you can test this code on some of the not tested grids, I would appreciate if you do it and let me know :) Especially EASE grids.

  • EASE-grids - all.
  • EASE2-grids - 1km, 3km, 3.125km, 6.25km and 25km

USAGE

from ease_lonlat import EASE2GRID, SUPPORTED_GRIDS

# define new grid by yourself
grid = EASE2GRID(name='EASE2_G36km', epsg=6933, x_min=-17367530.45, y_max=7314540.83, res=36032.22, n_cols=964, n_rows=406)

# or using parameters taken from NSIDC and kept in SUPPORTED_GRIDS
grid = EASE2GRID(name='EASE2_G36km', **SUPPORTED_GRIDS['EASE2_G36km'])

# convert longitude and latitude to row and col indices
point_lon = 17.4
point_lat = 49.4

# row should be 48, col should be 528
col, row = grid.lonlat2rc(lon=point_lon, lat=point_lat)

# get lon, lat of the center of the pixel
pixel_center_lon, pixel_center_lat = grid.rc2lonlat(col=col, row=row)

TODO

  • Generate grid for given region (by lat/lon min/max)
  • Add documentation

Metadata

Release files for ease-lonlat 0.0.3.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ease-lonlat 0.0.3.6
File Size Uploaded Provenance
ease_lonlat-0.0.3.6.tar.gz 7.6 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ease-lonlat 0.0.3.6
File Interpreter ABI Platform
ease_lonlat-0.0.3.6-py3-none-any.whl Python 3 none any Details

Total release size: 14.3 kB

Release files / ease_lonlat-0.0.3.6.tar.gz

Download URL ease_lonlat-0.0.3.6.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
bd91f16b7cfab471a6f38d7fa889c039a5d2325e0e7fa09834c20df0ee1f6b27
BLAKE2b-256 checksum
How to use checksums
d675f847815ecb94ae81bebc640c37b026be8d4b042c4da6b9cda60f5d18973c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 24, 2026.

Transparency log

Release files / ease_lonlat-0.0.3.6-py3-none-any.whl

Download URL ease_lonlat-0.0.3.6-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c3c58a0d10987d458580c56ba4f61f9eed67a99eae0fdbb7aa860b1b1aff55ef
BLAKE2b-256 checksum
How to use checksums
c350d03fc38039a47ce7cb70ee56cf8c41cc9508770af3be68f441cba8e49620
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 24, 2026.

Transparency log

Security for ease-lonlat 0.0.3.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ease_lonlat-0.0.3.6.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page