A Geospatial data handling library.
Project description
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_rastercreate_grid_on_vectorrasterize
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.
import geopandas as gpd
import matplotlib.pyplot as plt
from rasvec import create_grid_on_vector
gdf = gpd.read_file(r"sample_data/vector/vec/vec.shp")
#
grid_cells = create_grid_on_vector("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].set_title("Original Vector Data")
gdf.plot(ax=ax[1])
grid_cells.plot(ax=ax[1], facecolor="none", edgecolor="red")
ax[1].set_title("Vector Data with Grid Overlay")
ax[0].axis("off")
ax[1].axis("off")
plt.tight_layout()
The output:
Installation
install from PyPi
To install the library from PyPi run the below command in your terminal.
pip install rasvec
install from GitHub
To install the development version from GitHub using Git, run the following command in your terminal.
pip install git+https://github.com/davnish/rasvec.git
acknowledgements
This package was made possible due to the following open source projects.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rasvec-0.1.4.tar.gz.
File metadata
- Download URL: rasvec-0.1.4.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
755ca8fc3ae6675a07f8f322dbfacb517649319c3f124e246bd1547220f355ca
|
|
| MD5 |
5c66214e230bfcc1e51914ec4dd22251
|
|
| BLAKE2b-256 |
8f937c4c4bc4ce77ad7ab4ca8fd38c4c0bad80b7e167f4b8a7a833a587fec5bd
|
Provenance
The following attestation bundles were made for rasvec-0.1.4.tar.gz:
Publisher:
python-publish.yml on davnish/rasvec
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rasvec-0.1.4.tar.gz -
Subject digest:
755ca8fc3ae6675a07f8f322dbfacb517649319c3f124e246bd1547220f355ca - Sigstore transparency entry: 211925033
- Sigstore integration time:
-
Permalink:
davnish/rasvec@a9466075df5ff2195bba0c3108c04c713ea33448 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/davnish
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@a9466075df5ff2195bba0c3108c04c713ea33448 -
Trigger Event:
release
-
Statement type:
File details
Details for the file rasvec-0.1.4-py3-none-any.whl.
File metadata
- Download URL: rasvec-0.1.4-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
494539968117d6849afe3d3c3f8428505f0750ded0cbbae1676806ad5746752e
|
|
| MD5 |
516dd6a77a7b4adde1f9c6d962a26ac7
|
|
| BLAKE2b-256 |
f829241f9a1e6ccf4d4c3f0b9914b42c3785b436edfd367540fda136a9ad875d
|
Provenance
The following attestation bundles were made for rasvec-0.1.4-py3-none-any.whl:
Publisher:
python-publish.yml on davnish/rasvec
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rasvec-0.1.4-py3-none-any.whl -
Subject digest:
494539968117d6849afe3d3c3f8428505f0750ded0cbbae1676806ad5746752e - Sigstore transparency entry: 211925039
- Sigstore integration time:
-
Permalink:
davnish/rasvec@a9466075df5ff2195bba0c3108c04c713ea33448 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/davnish
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@a9466075df5ff2195bba0c3108c04c713ea33448 -
Trigger Event:
release
-
Statement type: