Spatial ETL wannabe
Project description
Papotch
Spatial ETL wannabe
Trying to build a user-friendly API to process spatial data around polars(_st) DataFrames.
Something like:
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
papotch-0.0.1.tar.gz
(28.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
papotch-0.0.1-py3-none-any.whl
(17.6 kB
view details)
File details
Details for the file papotch-0.0.1.tar.gz.
File metadata
- Download URL: papotch-0.0.1.tar.gz
- Upload date:
- Size: 28.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91cad840023f7f6ebcb0ab6fa098c3c2bd4b087582ea7ab012a28c93a25ad19d
|
|
| MD5 |
2d2f83b9cef46d0c18ac1e3841fcf916
|
|
| BLAKE2b-256 |
26a35a9d2c49d448833bb443da88e9b760b65a2eb93a0e24386b0fb2efa43e03
|
File details
Details for the file papotch-0.0.1-py3-none-any.whl.
File metadata
- Download URL: papotch-0.0.1-py3-none-any.whl
- Upload date:
- Size: 17.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94cfff4ac68c70e558105a2a30d89d5b626377c51c52a274113255d19754f550
|
|
| MD5 |
f6563b0d4c8237201272ffba6d6d7377
|
|
| BLAKE2b-256 |
f7a53be0b9706a7b666fcf0b36b41a39cfe74f0bde22b6285f2bb3439d30cf5f
|