Metadata-Version: 2.1
Name: mlstac
Version: 0.1.2
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: numpy (>=1.26.4)
Requires-Dist: pandas (>=2.1.4)
Requires-Dist: rasterio (>=1.3.10)
Requires-Dist: requests (>=2.31.0,<3.0.0)
Requires-Dist: tqdm (>=4.66.5,<5.0.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.load_metadata(path)
data = mlstac.load_data(metadata[0:4])
data.shape

# Read the data locally
path = "/home/cesar/Downloads/images_2000.mlstac"
dataset = mlstac.load_metadata(path)
data = mlstac.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.load_metadata(path)
data, metadata = mlstac.load_data(metadata[0:1], save_metadata_datapoint=True)[0]
with rio.open("data.tif", "w", **metadata) as dst:
    dst.write(data)
```

