
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
A simple Python package to convert Lambert Conformal Conic (LCC) grid coordinates to latitude and longitude.
Lambert Conformal Conic(ランベルト正角円錐図法)座標系の格子インデックスから、対応する緯度・経度座標を計算するPythonパッケージです。get_coord()
関数および GrADSのCTLファイルに対応した get_coord_from_ctl()
関数を提供します。
Install using pip:
pip install lccgrid
pip
でインストールできます。
from lccgrid import get_coord
# Example input: 100x100 grid with 10km spacing centered at 35N, 135E
lon, lat = get_coord(
nx=100, ny=100,
lat1=35.0, lon1=135.0,
nx_orig=50, ny_orig=50,
stdlat1=30.0, stdlat2=60.0,
lon0=135.0,
dx=10000, dy=10000
)
Returns lon
and lat
as 2D arrays of shape (ny, nx)
.
返り値の lon
および lat
は (ny, nx)
の2次元NumPy配列で、それぞれ格子点ごとの経度・緯度を表します。
If you have a GrADS .ctl
file that defines an LCC projection using a PDEF
line, you can directly compute the grid coordinates:
GrADS形式の .ctl
ファイルに PDEF
行が含まれている場合、次のように簡単に緯度経度を取得できます:
from lccgrid import get_coord_from_ctl
lon, lat = get_coord_from_ctl("path/to/your.ctl")
The returned lon
and lat
are 2D NumPy arrays of shape (ny, nx)
containing longitude and latitude coordinates at each grid point.
返り値の lon
および lat
は (ny, nx)
形状のNumPy配列で、それぞれ格子点ごとの経度・緯度を格納しています。
get_coord(
nx: int,
ny: int,
lat1: float,
lon1: float,
nx_orig: int,
ny_orig: int,
stdlat1: float,
stdlat2: float,
lon0: float,
dx: float,
dy: float
) -> Tuple[np.ndarray, np.ndarray]
nx
, ny
: Number of grid points in X and Y directions.
lat1
, lon1
: Latitude and longitude of the origin (center of projection).
nx_orig
, ny_orig
: Grid index at the origin (usually 1-based).
stdlat1
, stdlat2
: First and second standard parallels.
lon0
: Central meridian of the projection.
dx
, dy
: Grid spacing in meters.
(lon, lat)
: 2D arrays of longitude and latitude.
This project is licensed under the MIT License. See the LICENSE file for details.
MITライセンスのもとで公開されています。詳細は LICENSE ファイルをご覧ください。
FAQs
Convert Lambert Conformal grid to lat/lon coordinates
We found that lccgrid demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.