Package to load Ellipsis raster and vector layers as pySpark DataFrames.
Project description
This package is meant to help you run models on Ellipsis Drive content. It should be used in combination with the ellipsis package.
Synopsis
A package to parse Ellipsis Drive layers as pySpark DataFrames.
Install
pip install ellipsisPySpark
Example
from pyspark.sql import SparkSession
from ellipsisPySpark import readVector
from ellipsisPySpark import readRaster
#pathId, timestampId and token as can be obtained via the Ellipsis Drive interface via 'integrate'
pathId = '632aeb3f-ca77-4bdd-a8cd-5f733dbd87ee'
timestampId = 'da3bb83d-8cc0-45e4-a96d-e6db0f83616b'
token = 'epat_MY2lyE9txCGaWHxUt1CXkLnMUoAWpgkepma3XqzlranvhcpY8CaByBAaBpOybKOK'
sparkSession = SparkSession.builder.appName('tutorial').getOrCreate()
#read the vector layer as a spark dataframe
spark_df = readVector(sparkSession= sparkSession, pathId=pathId, timestampId=timestampId, token=token)
#pathId, timestampId and token as can be obtained via the Ellipsis Drive interface via 'integrate'
pathId = 'd951d941-3340-4a81-a7a3-f87e3651f83c'
timestampId = 'c6d976d8-7fc3-4ff4-80d9-734928701e24'
token = 'epat_Fr2QlosaiN0M0tGEWhlRlPhLnmOP5xP0OuPq1ca6kzgtRF6D3l4Bd94lOSu7RcQ8'
#read the raster layer as a spark dataframe
spark_df = readRaster(sparkSession= sparkSession, pathId=pathId, timestampId=timestampId, token=token)
Functions
readVector
readVector(sparkSession, pathId, timestampId, token=None)
This function parses an Ellipsis Drive vector layer as a pySpark DataFrame
Name | Description |
---|---|
sparkSession | A session as created using pySpark. |
pathId | The id of the vector layer to load as a pySpark dataframe |
timestampId | The id of the timestamp to load as a pySpark dataframe |
token | A token to authenticate (optional) |
readRaster
readRaster(sparkSession, pathId, timestampId, token= None, extent = None)
This function parses an Ellipsis Drive vector layer as a pySpark DataFrame
Name | Description |
---|---|
sparkSession | A session as created using pySpark. |
pathId | The id of the raster layer to load as a pySpark dataframe |
timestampId | The id of the timestamp to load as a pySpark dataframe |
token | A token to authenticate (optional) |
extent | The extent to restrict to in WGS84 (optional) |
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
ellipsisPySpark-0.0.0.tar.gz
(4.3 kB
view details)
Built Distribution
File details
Details for the file ellipsisPySpark-0.0.0.tar.gz
.
File metadata
- Download URL: ellipsisPySpark-0.0.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/6.8.0 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.31.0 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ecf55f85cf67b959663402122db6e4b66d36e5fb498a8c7d558fcc8e168104a2 |
|
MD5 | 0a518c66afba8284aac16be444246fcc |
|
BLAKE2b-256 | 7a7547da71a1e549e4e867ba9dbf492fac9a548771f3a999173cbe1d3f64cfd3 |
File details
Details for the file ellipsisPySpark-0.0.0-py3-none-any.whl
.
File metadata
- Download URL: ellipsisPySpark-0.0.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/6.8.0 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.31.0 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2ee5ddca91ebc0ab2ab1ce0c837c2f4849c808fce6b5a707e54d5cdb8431d51 |
|
MD5 | a16e60ad532edccfed570f1a90988176 |
|
BLAKE2b-256 | f74f8382c6736372857b91720e5daadd439de3e9b133070bfd77af7c550fb62d |