Skip to main content

geopathfinder

https://github.com/TUW-GEO/geopathfinder/workflows/ubuntu/badge.svg https://github.com/TUW-GEO/geopathfinder/workflows/windows/badge.svg https://badge.fury.io/py/geopathfinder.svg https://readthedocs.org/projects/geopathfinder/badge/?version=latest https://img.shields.io/badge/License-MIT-yellow.svg

A package for creating, querying, and searching in data structures holding geo data sets.

Description

This packages aims to provide a rich toolbox for efficient, quick, and precise handling of filenames and folder structures for geo-data, most conviniently when combined with grid objects as e.g. the https://github.com/TUW-GEO/Equi7Grid.

With pre-defined sets comprising string-definitions, folder path logics, and filename en-/decoders, a variety of file/folder naming conventions can be implemented.

The base classes SmartPath() and SmartTree() comprise also functions for file search and folder(-tree) volume determination.

Adding a new filenaming convention

In general, please follow the code and test guidelines of existing naming conventions. The following description aims to show how to implement a new naming convention:

  • Create a new .py file in the folder “geopathfinder/naming_conventions/”. The filename should be an abbreviation of the new naming convention separated from “naming” with an underscore, e.g., “sgrt_naming.py” ot “eodr_naming.py”.

  • Inside this file, write a new class, which inherits from SmartFilename. In this class you can define how the filename structure should look like. For each field you can define the length of the field (‘len’, integer), the start index of a field (‘start’, integer), if a delimiter should be in between the current and the previous part of the filename (‘delim’, boolean) and finally, if desired, a decoding and encoding function (‘decoder’, ‘encoder’). The latter parameters should point via a lambda function to a decoding or encoding method defined in the same class.

  • Finally, the parent class SmartFilename can be initiated with the given fields, fields definitions, a padding, a delimiter and a boolean value if en-/decoding should be applied or not.

  • If you want to read a filename with your created class, you can overwrite the class method from_filename and use your field definitions for the parent class method call from_filename.

  • Sometimes one needs information from a part of a filename, which can be directly derived/decoded from one or multiple filename entries. An example would be a mean date derived from the start and end date specified in the filename. To allow this, one can define methods tagged with property in the current class. SmartFilename then handles the properties of the inherited class equally to a common filename entry given in the field definition.

  • Add tests to “tests” and name the test file “test_[]_naming.py”, where “[]” should be replaced by the abbreviation of the new naming convention.

Note

This project has been set up using PyScaffold 4.6. For details and usage information on PyScaffold see https://pyscaffold.org/.

Metadata

Release files for geopathfinder 0.2.0

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

Source distribution (sdist)

Source distribution for geopathfinder 0.2.0
File Size Uploaded Provenance Actions
geopathfinder-0.2.0.tar.gz 1.1 MB Without provenance Details for geopathfinder-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 1.1 MB

Release files / geopathfinder-0.2.0.tar.gz

Download URL geopathfinder-0.2.0.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
f49e50b1b65b8c8dd2759b60faae05eddd7e0384e74e2e77832a100473e21a17
BLAKE2b-256 checksum
How to use checksums
2a826a7a5ff3946401418ffff9ac7f607f6b036b303f27476dbabdc473fe5032
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.20

Release files / geopathfinder-0.2.0-py3-none-any.whl

Download URL geopathfinder-0.2.0-py3-none-any.whl
Size 33.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
998c8f4d108262349e7c704f1dd6c28a318be4b1b57912bd60559c71eb0700bc
BLAKE2b-256 checksum
How to use checksums
714bfa6636ea3d6bdb7e3f77747c9f7530e1cf18972462c808ba7a013864a3b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.20

Security for geopathfinder 0.2.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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