Commit 5120ae72 authored by Cresson Remi's avatar Cresson Remi
Browse files

DOC: improve documentation

1 merge request!33DOC: add examples
Pipeline #35123 passed with stages
in 4 minutes and 8 seconds
Showing with 30 additions and 1 deletion
+30 -1
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
This module aims to deal with dates This module aims to deal with dates.
---
The `datetime.datetime` class is used as internal date type.
```
#!python
dt = datetime.datetime(year=2020, month=12, day=2)
```
Is equivalent to:
```
dt = str2datetime("02-12-2020")
dt = str2datetime("2020-12-02")
dt = str2datetime("02/12/2020")
```
The `any2datetime` method returns a `datetime.datetime` instance, whatever the input is (`str` or
`datetime.datetime`).
```
dt1 = datetime.datetime(year=2020, month=12, day=2)
dt2 = str2datetime("02-12-2020")
dt1_2 = any2datetime(dt1) # same
dt2_2 = any2datetime("02-12-2020") # same
```
The `get_timestamp` method converts a `datetime.datetime` instance into a number of seconds (int).
```
ts = get_timestamp(dt) # 1606780800.0
```
""" """
import datetime import datetime
......
...@@ -185,6 +185,7 @@ class Spot67Imagery(Imagery): ...@@ -185,6 +185,7 @@ class Spot67Imagery(Imagery):
Spot 6/7 imagery class. Spot 6/7 imagery class.
A `Spot67Imagery` instance carries the following `Spot67Source` instances: A `Spot67Imagery` instance carries the following `Spot67Source` instances:
- xs: the multispectral channels (Red, Gree, Blue, Near infrared @ 6.0 meters spacing) - xs: the multispectral channels (Red, Gree, Blue, Near infrared @ 6.0 meters spacing)
- pan: the panchromatic channel (Visible domain @ 1.5 meters spacing) - pan: the panchromatic channel (Visible domain @ 1.5 meters spacing)
- pxs: the pansharpened channels (Red, Gree, Blue, Near infrared @ 1.5 meters spacing) - pxs: the pansharpened channels (Red, Gree, Blue, Near infrared @ 1.5 meters spacing)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment