Skip to main content

VineyardUtils

A Python package for digital agriculture in vineyard-related activities

VineyardUtils is a Python package designed to assist in handling georeferenced data, processing KML files, and organizing data from field activities in vineyards. This package provides several utility functions and tools to streamline data operations and analysis.

Installation

You can install VineyardUtils using pip:

pip install VineyardUtils

Note: for some functions an external OSGeo package must be installed in the system.

Usage

import VineyardUtils

Functions

Datasampler

cut_data(dataframe, time, timecolumn):
Splits a DataFrame based on time intervals specified.

field_counter(dataf, min_number, exclude_words=None):
Counts occurrences of fields in a DataFrame and appends the most common field as a new column.

get_summary_stats(df, columns=None):
Computes summary statistics from specified columns in a DataFrame.

Elevation

get_elevation(osgeopath, coordmode, geotiff_filename, lat, lon):
Retrieves elevation data from a GeoTIFF file using gdallocationinfo.

crop_geotiff(osgeopath, srsmode, minlon, minlat, maxlon, maxlat, source_path_tif, output_path_tif):
Crops a GeoTIFF file to specified bounding box coordinates.

get_elevation_list(osgeopath, sourcename, coordmode, geotiff_filename):
Retrieves a list of elevations from a list of coordinates stored in a file.

add_elevation_to_df(df, latcolname, loncolname, osgeopath, coordmode, geotiff_filename, crop=False, type_srs="EPSG:4326"):
Adds elevation data to a DataFrame based on latitude and longitude columns.

KMLUtils

extract_coordinates(file_path):
Extracts longitude and latitude coordinates from a KML file.

calculate_angle(x1, y1, x2, y2, x3, y3):
Calculates the angle between three points.

iterate_check_angle(longitudes, latitudes, tanklevels, min_angle, max_angle, elevation):
Iterates through a list of coordinates to find tuples based on specified angles.

generate_alpha_shapes(dataframe, alpha=0.2):
Generates alpha shapes from longitude and latitude coordinates.

create_kml(dataframe, row_tuples, kml_filename='outputfile.kml'):
Creates a KML file with polygons and lines based on specified rows of coordinates.

Dependencies

pandas
numpy
scikit-learn
simplekml
alphashape

Contributing

Contributions are welcome! For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for VineyardUtils 1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for VineyardUtils 1.1
File Size Uploaded Provenance Actions
vineyardutils-1.1.tar.gz 8.7 kB With provenance Details for vineyardutils-1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for VineyardUtils 1.1
File Interpreter ABI Platform Actions
vineyardutils-1.1-py3-none-any.whl Python 3 none any Details for vineyardutils-1.1-py3-none-any.whl

Total release size: 18.6 kB

Release files / vineyardutils-1.1.tar.gz

Download URL vineyardutils-1.1.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d9cfdb9d1d63913e2bc26da61e29f9799d9cf5f46b3b35d0536b643643a12bfd
BLAKE2b-256 checksum
How to use checksums
d645980ac48f666ee5da5a7c0f75e43a183c0691e822c561443886f30a3e7855
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 5, 2026.

Transparency log

Release files / vineyardutils-1.1-py3-none-any.whl

Download URL vineyardutils-1.1-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c6c581b4a501fd5a2e68bcffb4c7ad824da1419873fbc09b51cb939fc6962cc
BLAKE2b-256 checksum
How to use checksums
704d166b93fe4de0f86645b0b740f932517bf1697fbfcfc082905e06721d2f98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 5, 2026.

Transparency log

Security for VineyardUtils 1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for vineyardutils-1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page