semvec/pypi-packages huggingface dataset:
geodataExtent 0.2.8
Package for extracting the time and spatial extent of Geodata

- [Use as CLI-Tool](#use-as-cli-tool)
  - [Install](#install)
  - [Usage](#usage)
    - [Examples](#examples)
- [Use as module](#use-as-module)

# Use as CLI-Tool

## Install

```bat
pip install geodataExtent
```
## Usage

```bat
extract-extent --help
```
gives:
```bat
Options:
  --path TEXT  Path to Folder containing Geofiles
  -c, --clear  Clear screen before showing results
  -t, --time   execute time extraction for one file
  -s, --space  execute boundingbox extraction for one file
  -h, --hull   execute convex-hull extraction for one file
  --help       Show this message and exit.
```
Those are **only** options, you do not have to use them. However, if you do not choos any of the execution flags `(-t / -s / -h)`, the folderextraction will be triggered and gives you the spatial and temporal extent of each of your Geofiles within the chosen folder in addition to the full spatial and temporal extent of the folder.

You are not limeted to choose only one option but all of them at once except for `--help`.

If you do not use `--path`, the path will be prompted. That means it is a shortcut only.

### Examples

```
$ extract-extent -t -s -h
Pleas enter path to Folder: <path>
Pleas enter filename: <filename>

Timeextent:
['1935/01/01 00:00:00 GMT+0', '2014/01/01 00:00:00 GMT+0', 365.253164556962]


Spatialextent:
[-179.5, -89.5, 179.5, 89.5]


Spatialextent as Convex Hull:
[(-179.5, -89.5), (-179.5, 89.5), (179.5, 89.5), (179.5, -89.5)]
```

The Timeextent starts with the beginning and ends with the end date as ISO8601 standard. the last number is the average intervall in which measurements have been taken.

The spatial extent is shown as a boundingbox. `[minX/minLong, minY/minLat, maxX/maxLong, maxY/maxLat]`

For more percission the `-h / --hull` flag gives you the spatial exnent as a convex hull. That means from all the points of a dataset the outer most points are beeing calculated and returned in correct order.

#### Folderextraction <!-- omit in toc -->

If you want to extract your hole folder, the `-c / --clear` flag is recommended because a long list of processing outputs is generated before the final output appears.
```
$ extract-extent -c --path "<folder path>"
```

# Use as module
cocof 1.2.2
Consistent CLI config file modifier
Keywords: toml,yaml,json,terminal,cli,edit

# Cocof
[![Build Status](https://travis-ci.org/astzweig/cocof-py.svg?branch=master)](https://travis-ci.org/astzweig/cocof-py)
[![PyPI version](https://badge.fury.io/py/cocof.svg)](https://badge.fury.io/py/cocof)

Cocof, short for consistent config file, is a python module that allows the
modification of different key-value config files on the comand line.

Most importantly: For YAML and TOML it _It will keep line breaks and comments
the same._ So the file will look more or less like the original (depending on
the operations on it of course).

Currently supported formats are TOML, YAML, JSON and PLIST.

### Install
```bash
$ pip install cocof
```

### Usage
```bash
$ cocof --help
Usage: cocof [OPTIONS] FILEPATH JSONPATCH

  Cocof runs the provided 'jsonpatch' modifications on the configuration
  file given with the 'filepath' argument. Use the '--format' option to tell
  the file format. If not given cocof will try to guess the file format
  based on the file extension. Use '-' as filepath for stdin, in which case
  the output goes to stdout and you must provide the format of the data via
  the '--format' option.

Options:
  -f, --format [toml|yaml|json|plist]
                                  The format of the file. Obligatory if
                                  filepath is '-' (stdin).
  --help                          Show this message and exit.
```

Cocof takes a file path and a [JSON patch][json_patch] string as arguments.
It then modifies the datastructure given by the file's content accordingly and
writies it back to the same file (in-place editing).
You can also tell `cocof` to read from `stdin`, in which case it will output
it's result to `stdout`. TOML, YAML and JSON expect their content to be `utf-8`
encoded. PLIST expects either an `utf-8` encoded xml content or binary content.


### Examples
```TOML
# example.toml
title = "Example"

[owner]
name = "Tom Preston-Werner"
dob = 1979-05-27T07:32:00-08:00 # Inline comment

[database]
server = "192.168.1.1"
ports = [ 8001, 8001, 8002 ]
```

Using `{"op": "add", "path": "/subtitle", "value": "Sub"}` as modification
yields:

```bash
$ cocof ./example.toml '[{"op": "add", "path": "/subtitle", "value": "Sub"}]'`
$ cat ./example.toml
# example.toml
title = "Example"
subtitle = "Sub"

[owner]
name = "Tom Preston-Werner"
dob = 1979-05-27T07:32:00-08:00 # Inline comment

[database]
server = "192.168.1.1"
ports = [ 8001, 8001, 8002 ]
```

[json_patch]: https://tools.ietf.org/html/rfc6902