gridit

Provides spatial tools to translate raster or vector polygon data to regular grids

https://github.com/mwtoews/gridit

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.8%) to scientific vocabulary

Keywords from Contributors

geoscience mesh
Last synced: 7 months ago · JSON representation ·

Repository

Provides spatial tools to translate raster or vector polygon data to regular grids

Basic Info
  • Host: GitHub
  • Owner: mwtoews
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: main
  • Size: 1.07 MB
Statistics
  • Stars: 16
  • Watchers: 2
  • Forks: 5
  • Open Issues: 4
  • Releases: 7
Created over 3 years ago · Last pushed 8 months ago
Metadata Files
Readme Changelog License Citation

README.md

Gridit

Tests Codcov DOI

Description

Gridit provides spatial tools to translate raster or vector geometry data to regular grids.

Installation

This package primarily depends on NumPy and SciPy, and has several optional dependencies.

Pip can be used to install all optional dependencies: bash $ pip install gridit[optional]

Or from a clone of this repository, create an "editable" install: bash $ pip install -e .[optional]

Testing

Run pytest -v.

Examples

Python

```python

import matplotlib.pyplot as plt # optional from gridit import Grid

grid = Grid.fromvector("tests/data/Manapolygons.shp", 100) print(grid)

arvec = grid.arrayfromvector("tests/data/Manapolygons.shp", "Kmd") plt.imshow(ar_vec)

arrast = grid.arrayfromraster("tests/data/Mana.tif") plt.imshow(arrast) ```

Command line

Grid and array from vector, write PNG image and shapefile grid: bash $ gridit --grid-from-vector tests/data/Mana_polygons.shp --resolution 100 \ --array-from-vector tests/data/Mana_polygons.shp \ --array-from-vector-attribute=K_m_d \ --write-image /tmp/Mana_Kmd.png \ --write-vector /tmp/Mana_Kmd.shp

Grid from bounding box, array from raster, write GeoTIFF raster: bash $ gridit --grid-from-bbox 1748600 5448800 1750400 5451200 --resolution 100 \ --array-from-raster tests/data/Mana.tif \ --write-raster /tmp/Mana_100m.tif

Grid from vector, array from netCDF, write text array file for each time stat: bash $ gridit --grid-from-vector tests/data/waitaku2.shp --resolution 250 \ --array-from-vector tests/data/waitaku2.shp \ --array-from-vector-attribute rid \ --array-from-netcdf tests/data/waitaku2.nc:rid:myvar:0 \ --time-stats "quantile(0.75),max" \ --write-text /tmp/waitaku2_cat.ref

Grid from MODFLOW, array from vector, write text array file: bash $ gridit --grid-from-modflow tests/data/modflow/mfsim.nam:h6 \ --array-from-vector tests/data/waitaku2.shp \ --array-from-vector-attribute rid \ --write-text /tmp/waitaku2_rid.txt

See other options with: bash $ gridit -h

Funding

Funding for the development of gridit has been provided by New Zealand Strategic Science Investment Fund as part of GNS Science’s (https://www.gns.cri.nz/) Groundwater Research Programme.

Owner

  • Name: Mike Taves
  • Login: mwtoews
  • Kind: user
  • Location: Wellington, New Zealand
  • Company: GNS Science

Hydrogeologist, numerical modeller, GIS guru. Last name is also Toews.

Citation (CITATION.cff)

cff-version: 1.2.0
message: "Please cite this software using these metadata."
type: software
title: "Gridit"
version: "0.8"
date-released: "2025-06-23"
doi: 10.5281/zenodo.7030428
abstract: "Gridit provides spatial tools to translate raster or vector geometry data to regular grids."
repository-artifact: https://pypi.org/project/gridit
repository-code: https://github.com/mwtoews/gridit
license: "BSD-3-Clause"
authors:
  - given-names: "Mike W."
    family-names: Taves
    email: mwtoews@gmail.com
    affiliation: "GNS Science"
    orcid: "https://orcid.org/0000-0003-3657-7963"

GitHub Events

Total
  • Release event: 2
  • Delete event: 15
  • Push event: 39
  • Pull request review event: 1
  • Pull request event: 32
  • Create event: 15
Last Year
  • Release event: 2
  • Delete event: 15
  • Push event: 39
  • Pull request review event: 1
  • Pull request event: 32
  • Create event: 15

Committers

Last synced: almost 2 years ago

All Time
  • Total Commits: 61
  • Total Committers: 4
  • Avg Commits per committer: 15.25
  • Development Distribution Score (DDS): 0.148
Past Year
  • Commits: 23
  • Committers: 3
  • Avg Commits per committer: 7.667
  • Development Distribution Score (DDS): 0.348
Top Committers
Name Email Commits
Mike Taves m****s@g****m 52
pre-commit-ci[bot] 6****] 7
Brioch Hemmings b****h@g****m 1
Wes Kitlasten w****n@g****m 1

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 6
  • Total pull requests: 63
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 3 days
  • Total issue authors: 4
  • Total pull request authors: 4
  • Average comments per issue: 0.83
  • Average comments per pull request: 0.21
  • Merged pull requests: 60
  • Bot issues: 0
  • Bot pull requests: 12
Past Year
  • Issues: 0
  • Pull requests: 30
  • Average time to close issues: N/A
  • Average time to close pull requests: about 2 hours
  • Issue authors: 0
  • Pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 27
  • Bot issues: 0
  • Bot pull requests: 4
Top Authors
Issue Authors
  • mwtoews (2)
  • wkitlasten (1)
  • aubreyfox (1)
  • briochh (1)
Pull Request Authors
  • mwtoews (60)
  • pre-commit-ci[bot] (15)
  • wkitlasten (1)
  • briochh (1)
Top Labels
Issue Labels
enhancement (2)
Pull Request Labels
enhancement (18) bug (3)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 176 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 8
  • Total maintainers: 1
pypi.org: gridit

Spatial tools to translate raster or vector geometry data to regular grids

  • Versions: 8
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 176 Last month
Rankings
Dependent packages count: 6.6%
Stargazers count: 14.9%
Average: 19.3%
Forks count: 19.6%
Downloads: 24.8%
Dependent repos count: 30.6%
Maintainers (1)
Last synced: 7 months ago

Dependencies

.github/workflows/tests.yml actions
  • actions/cache v2 composite
  • actions/checkout v3 composite
  • actions/setup-python v2 composite
pyproject.toml pypi
  • numpy *
.github/workflows/release.yml actions
  • actions/checkout v4 composite
  • actions/upload-artifact v4 composite