Metadata-Version: 2.4
Name: papotch
Version: 0.0.1
Summary: Spatial ETL wannabe
Project-URL: Homepage, https://codeberg.org/jujube/papotch
Project-URL: Issues, https://codeberg.org/jujube/papotch/issues
Author-email: jujube <j.undisclosed@proton.me>
License-Expression: LGPL-2.1
License-File: LICENSE
Keywords: GIS,data,geographic,geospatial
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: GIS
Requires-Python: >=3.14
Requires-Dist: polars-st>=0.7.0
Description-Content-Type: text/markdown

# Papotch

## Spatial ETL wannabe

Trying to build a user-friendly API to process spatial data around polars(_st) DataFrames.

Something like:

```python
from papotch import Reader

r = Reader("path/to/data.shp")

d = r.extract()

d.head()
┌──────┬───────────┬───────────┬────────────┬─────────────────────────────────┐
│ id   ┆ value_int ┆ value_txt ┆ value_bool ┆ geometry                        │
│ ---  ┆ ---       ┆ ---       ┆ ---        ┆ ---                             │
│ i64  ┆ i64       ┆ str       ┆ bool       ┆ str                             │
╞══════╪═══════════╪═══════════╪════════════╪═════════════════════════════════╡
│ 0    ┆ 0         ┆ test      ┆ true       ┆ POLYGON ((2532293.417834 11600… │
│ 1    ┆ 1         ┆ éjwefw    ┆ false      ┆ POLYGON ((2548329.72787 115443… │
│ 2    ┆ 2         ┆ kjprg     ┆ false      ┆ POLYGON ((2538461.229386 11469… │
│ null ┆ null      ┆ null      ┆ false      ┆ POLYGON ((2532026.146 1159262.… │
│ null ┆ null      ┆ null      ┆ false      ┆ POLYGON ((2530319.718138 11547… │
└──────┴───────────┴───────────┴────────────┴─────────────────────────────────┘

_ = d.buffer(distance=2).area(column_name="calc_area").bounds()

d.head()
┌──────┬───────────┬───────────┬────────────┬─────────────────────────────────┬────────────┬─────────────────────────────────┐
│ id   ┆ value_int ┆ value_txt ┆ value_bool ┆ geometry                        ┆ calc_area  ┆ _bounds                         │
│ ---  ┆ ---       ┆ ---       ┆ ---        ┆ ---                             ┆ ---        ┆ ---                             │
│ i64  ┆ i64       ┆ str       ┆ bool       ┆ binary                          ┆ f64        ┆ array[f64, 4]                   │
╞══════╪═══════════╪═══════════╪════════════╪═════════════════════════════════╪════════════╪═════════════════════════════════╡
│ 0    ┆ 0         ┆ test      ┆ true       ┆ b"\x01\x03\x00\x00\x20\x08\x08… ┆ 112.794919 ┆ [2.5323e6, 1.1601e6, … 1.1601e… │
│ 1    ┆ 1         ┆ éjwefw    ┆ false      ┆ b"\x01\x03\x00\x00\x20\x08\x08… ┆ 112.794919 ┆ [2.5483e6, 1.1544e6, … 1.1544e… │
│ 2    ┆ 2         ┆ kjprg     ┆ false      ┆ b"\x01\x03\x00\x00\x20\x08\x08… ┆ 112.794919 ┆ [2.5385e6, 1.1470e6, … 1.1470e… │
│ null ┆ null      ┆ null      ┆ false      ┆ b"\x01\x03\x00\x00\x20\x08\x08… ┆ 112.794919 ┆ [2.5320e6, 1.1593e6, … 1.1593e… │
│ null ┆ null      ┆ null      ┆ false      ┆ b"\x01\x03\x00\x00\x20\x08\x08… ┆ 112.794919 ┆ [2.5303e6, 1.1548e6, … 1.1548e… │
└──────┴───────────┴───────────┴────────────┴─────────────────────────────────┴────────────┴─────────────────────────────────┘

d.write("PG:service=my_service", layer="my_layer")
```

The aim is to read data without thinking too much about it, apply transformations on all the objects and write them.


