https://github.com/davnish/rasvec

A geospatial data handling library.

https://github.com/davnish/rasvec

Science Score: 26.0%

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

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.8%) to scientific vocabulary

Keywords

geopython geospatial geospatial-data machine-learning
Last synced: 5 months ago · JSON representation

Repository

A geospatial data handling library.

Basic Info
Statistics
  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • Open Issues: 1
  • Releases: 3
Topics
geopython geospatial geospatial-data machine-learning
Created about 1 year ago · Last pushed 9 months ago
Metadata Files
Readme License

README.md

Rasvec

This is a Python library designed to streamline the handling of geospatial data, particularly for machine learning applications. Working with geospatial datasets often involves challenges like rasterization, vectorization, and grid creation—this library provides efficient and easy-to-use functions to simplify these processes.

  • Documentation : https://rasvec.readthedocs.io

Features

vectors

  • clip_vector_by_raster
  • create_grid_on_vector
  • rasterize

rasters

  • patchify (divides the raster into geotagged patches)
  • vectorization

satellite imagery

  • tms_to_geotiff

view

  • view_rasters

Example

Here's an example of a feature: Generating a grid over a vector file.

```python import geopandas as gpd import matplotlib.pyplot as plt from rasvec import creategridon_vector

gdf = gpd.readfile(r"sampledata/vector/vec/vec.shp")

gridcells = creategridonvector("sample_data/vector/vec/vec.shp", 1000, "grid.shp")

fig, ax = plt.subplots(1,2, figsize=(10, 10)) gdf.plot(ax=ax[0]) ax[0].settitle("Original Vector Data") gdf.plot(ax=ax[1]) gridcells.plot(ax=ax[1], facecolor="none", edgecolor="red") ax[1].settitle("Vector Data with Grid Overlay") ax[0].axis("off") ax[1].axis("off") plt.tightlayout()

``` The output:

Installation

install from PyPi

To install the library from PyPi run the below command in your terminal.

bash pip install rasvec

install from GitHub

To install the development version from GitHub using Git, run the following command in your terminal.

bash pip install git+https://github.com/davnish/rasvec.git

acknowledgements

This package was made possible due to the following open source projects.

Owner

  • Name: Nischal Singh
  • Login: davnish
  • Kind: user
  • Location: India

GitHub Events

Total
  • Create event: 10
  • Release event: 9
  • Issues event: 6
  • Watch event: 2
  • Delete event: 4
  • Issue comment event: 1
  • Push event: 68
Last Year
  • Create event: 10
  • Release event: 9
  • Issues event: 6
  • Watch event: 2
  • Delete event: 4
  • Issue comment event: 1
  • Push event: 68

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 38 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 7
  • Total maintainers: 1
pypi.org: rasvec

A Geospatial data handling library.

  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 38 Last month
Rankings
Dependent packages count: 9.5%
Average: 31.6%
Dependent repos count: 53.7%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/ci.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v3 composite
pyproject.toml pypi
requirements.txt pypi
  • ensure *
  • geopandas *
  • matplotlib *
  • patchify *
  • pillow *
  • rasterio *
  • xyzservices *
requirements_dev.txt pypi
  • ensure * development
  • geopandas * development
  • matplotlib * development
  • patchify * development
  • pillow * development
  • pytest * development
  • rasterio * development
  • tox * development
  • xyzservices * development
setup.py pypi
  • geopandas >=1.0.1
  • patchify >=0.2.3
  • pillow >=11.1.0
  • rasterio >=1.4.3
  • xyzservices >=2025.1.0