Access and process geospatial raster data in PySpark DataFrames
Project description
PyRasterFrames
PyRasterFrames enables access and processing of geospatial raster data in PySpark DataFrames.
Getting started
The quickest way to get started is to pip
install the pyrasterframes package.
pip install pyrasterframes
You can then access a pyspark SparkSession
using the local[*]
master in your python interpreter as follows.
from pyrasterframes.utils import create_rf_spark_session
spark = create_rf_spark_session()
Then you can read a raster and do some work with it.
from pyrasterframes.rasterfunctions import *
from pyspark.sql.functions import lit
# Read a MODIS surface reflectance granule
df = spark.read.raster('https://modis-pds.s3.amazonaws.com/MCD43A4.006/11/08/2019059/MCD43A4.A2019059.h11v08.006.2019072203257_B02.TIF')
# Add 3 element-wise, show some rows of the dataframe
df.select(rf_local_add(df.tile, lit(3))).show(5, False)
Support
Reach out to us on gitter!
Issue tracking is through github.
Contributing
Community contributions are always welcome. To get started, please review our contribution guidelines, code of conduct, and developer's guide. Reach out to us on gitter so the community can help you get started!
Development environment setup
For best results, we suggest using conda
and the conda-forge
channel to install the compiled dependencies before installing the packages in setup.py
. Assuming you're in the same directory as this file:
conda create -n rasterframes python==3.7
conda install --file ./requirements-condaforge.txt
Then you can install the source dependencies:
pip install -e .
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file pyrasterframes-0.11.1.tar.gz
.
File metadata
- Download URL: pyrasterframes-0.11.1.tar.gz
- Upload date:
- Size: 28.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.8.16 Darwin/22.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c0387fec8e8a4249c00e108e686a3c4cfe10cbc22ad21cfe8e400551309851a |
|
MD5 | f12446ae542e87eb7f811b2eabbce7ea |
|
BLAKE2b-256 | 63d330fd9f89ed3bb0e9e149da6a681b03d2ff98bc1b4ba786664d80117b7105 |
File details
Details for the file pyrasterframes-0.11.1-py3-none-any.whl
.
File metadata
- Download URL: pyrasterframes-0.11.1-py3-none-any.whl
- Upload date:
- Size: 32.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.8.16 Darwin/22.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93668380519e0b6e36f54ece5a3b7ecd496cb3d9b742983ac16b6740f77da13e |
|
MD5 | 81e20ddb3d500d90432c4dc3841c18e3 |
|
BLAKE2b-256 | 32c647be1a85a6678958e8f83203f1ec3710e35d790ba9188206ccb29dccaa90 |