Skip to main content

Simple Earth polygon "CLI" tool

Project description

geopoly

Simple "CLI" tool to mark polygons on a global map (with zooming) and then produce masks with said polygons with a given grid.

Install

Install with:

pipx install gpoly

Or with the following for Apple Silicon:

pipx install gpoly --pip-args='--no-binary :all:'

Example grid.JSON

Example python script to make the grid.json:

import numpy as np
import json

# resolution of 2 degree grid
N = 2
lon, lat = np.meshgrid(np.arange(-180, 180+N, N), np.arange(-90, 90+N, N))

lon = lon.tolist()
lat = lat.tolist()

# saving as a json file with the 'lat' and 'lon' keywords
grid = {'lon': lon, 'lat': lat}
with open('grid.json', 'w') as file:
    json.dump(grid, file)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gpoly-0.1.2.tar.gz (44.8 kB view hashes)

Uploaded Source

Built Distribution

gpoly-0.1.2-py3-none-any.whl (31.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page