Metadata-Version: 2.1
Name: mlstac
Version: 0.1.3
Summary: A Common Language for EO Machine Learning Data
Home-page: https://github.com/csaybar/mlstac
Author: Cesar Aybar
Author-email: fcesar.aybar@uv.es
Requires-Python: >=3.10,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Requires-Dist: mdutils (>=1.6.0)
Requires-Dist: numpy (>=1.26.4)
Requires-Dist: pandas (>=2.1.4)
Requires-Dist: pydantic (>=2.3.0)
Requires-Dist: rasterio (>=1.3.10)
Requires-Dist: requests (>=2.00.0)
Requires-Dist: tqdm (>=4.00.0)
Project-URL: Documentation, https://csaybar.github.io/mlstac/
Project-URL: Repository, https://github.com/csaybar/mlstac
Description-Content-Type: text/markdown

# mlstac

A Common Language for EO Machine Learning Data


```python
import mlstac

# Read the data online
path = "https://huggingface.co/datasets/JulioContrerasH/prueba1/resolve/main/images_2000.mlstac"
metadata = mlstac.core.load_metadata(path)
data = mlstac.core.load_data(metadata[0:4])
data.shape

# Read the data locally
path = "/home/cesar/Downloads/images_2000.mlstac"
dataset = mlstac.core.load_metadata(path)
data = mlstac.core.load_data(dataset[0:4])

# From mlstac to GEOTIFF
import rasterio as rio
path = "https://huggingface.co/datasets/JulioContrerasH/prueba1/resolve/main/images_2000.mlstac"
metadata = mlstac.core.load_metadata(path)
data, metadata = mlstac.core.load_data(metadata[0:1], save_metadata_datapoint=True)[0]
with rio.open("data.tif", "w", **metadata) as dst:
    dst.write(data)
```

