freestiler 0.1.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. freestiler-0.1.4/LICENSE.md +21 -0
  2. freestiler-0.1.4/PKG-INFO +134 -0
  3. freestiler-0.1.4/README.md +92 -0
  4. freestiler-0.1.4/pyproject.toml +64 -0
  5. freestiler-0.1.4/python/Cargo.lock +3661 -0
  6. freestiler-0.1.4/python/Cargo.toml +34 -0
  7. freestiler-0.1.4/python/LICENSE.md +21 -0
  8. freestiler-0.1.4/python/README.md +92 -0
  9. freestiler-0.1.4/python/RELEASING.md +68 -0
  10. freestiler-0.1.4/python/build.rs +5 -0
  11. freestiler-0.1.4/python/freestiler/__init__.py +633 -0
  12. freestiler-0.1.4/python/freestiler/_freestiler.pyi +67 -0
  13. freestiler-0.1.4/python/freestiler/py.typed +0 -0
  14. freestiler-0.1.4/python/setup_env.sh +35 -0
  15. freestiler-0.1.4/python/src/lib.rs +601 -0
  16. freestiler-0.1.4/python/tests/test_basic.py +120 -0
  17. freestiler-0.1.4/python/tests/test_crs.py +37 -0
  18. freestiler-0.1.4/python/tests/test_features.py +124 -0
  19. freestiler-0.1.4/python/tests/test_file_input.py +175 -0
  20. freestiler-0.1.4/python/tests/test_multilayer.py +113 -0
  21. freestiler-0.1.4/python/tests/test_properties.py +75 -0
  22. freestiler-0.1.4/python/tests/test_query.py +191 -0
  23. freestiler-0.1.4/src/rust/freestiler-core/Cargo.lock +3760 -0
  24. freestiler-0.1.4/src/rust/freestiler-core/Cargo.toml +60 -0
  25. freestiler-0.1.4/src/rust/freestiler-core/src/clip.rs +240 -0
  26. freestiler-0.1.4/src/rust/freestiler-core/src/cluster.rs +203 -0
  27. freestiler-0.1.4/src/rust/freestiler-core/src/coalesce.rs +283 -0
  28. freestiler-0.1.4/src/rust/freestiler-core/src/drop.rs +98 -0
  29. freestiler-0.1.4/src/rust/freestiler-core/src/engine.rs +418 -0
  30. freestiler-0.1.4/src/rust/freestiler-core/src/file_input.rs +553 -0
  31. freestiler-0.1.4/src/rust/freestiler-core/src/lib.rs +18 -0
  32. freestiler-0.1.4/src/rust/freestiler-core/src/mlt.rs +2994 -0
  33. freestiler-0.1.4/src/rust/freestiler-core/src/mvt.rs +432 -0
  34. freestiler-0.1.4/src/rust/freestiler-core/src/pmtiles_writer.rs +257 -0
  35. freestiler-0.1.4/src/rust/freestiler-core/src/simplify.rs +259 -0
  36. freestiler-0.1.4/src/rust/freestiler-core/src/streaming.rs +669 -0
  37. freestiler-0.1.4/src/rust/freestiler-core/src/tiler.rs +195 -0
@@ -0,0 +1,21 @@
1
+ # MIT License
2
+
3
+ Copyright (c) 2026 Kyle Walker
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,134 @@
1
+ Metadata-Version: 2.4
2
+ Name: freestiler
3
+ Version: 0.1.4
4
+ Classifier: Development Status :: 3 - Alpha
5
+ Classifier: Intended Audience :: Developers
6
+ Classifier: Intended Audience :: Science/Research
7
+ Classifier: License :: OSI Approved :: MIT License
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.9
10
+ Classifier: Programming Language :: Python :: 3.10
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Rust
14
+ Classifier: Topic :: Scientific/Engineering :: GIS
15
+ Classifier: Typing :: Typed
16
+ Requires-Dist: geopandas>=0.14
17
+ Requires-Dist: shapely>=2.0
18
+ Requires-Dist: pyproj>=3.0
19
+ Requires-Dist: numpy>=1.24
20
+ Requires-Dist: build>=1.2 ; extra == 'dev'
21
+ Requires-Dist: maturin>=1.7,<2.0 ; extra == 'dev'
22
+ Requires-Dist: pyarrow>=14 ; extra == 'dev'
23
+ Requires-Dist: pytest>=7.0 ; extra == 'dev'
24
+ Requires-Dist: twine>=5.1 ; extra == 'dev'
25
+ Requires-Dist: pyarrow>=14 ; extra == 'test'
26
+ Requires-Dist: pytest>=7.0 ; extra == 'test'
27
+ Provides-Extra: dev
28
+ Provides-Extra: test
29
+ License-File: LICENSE.md
30
+ Summary: Rust-powered MLT/MVT vector tile engine for Python
31
+ Keywords: gis,geospatial,maplibre,mvt,pmtiles,vector-tiles
32
+ Home-Page: https://walker-data.com/freestiler/
33
+ Author-email: Kyle Walker <kyle@walker-data.com>
34
+ License: MIT
35
+ Requires-Python: >=3.9
36
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
37
+ Project-URL: Documentation, https://walker-data.com/freestiler/articles/python.html
38
+ Project-URL: Homepage, https://walker-data.com/freestiler/
39
+ Project-URL: Issues, https://github.com/walkerke/freestiler/issues
40
+ Project-URL: Repository, https://github.com/walkerke/freestiler
41
+
42
+ # freestiler for Python
43
+
44
+ `freestiler` builds PMTiles vector tile archives from GeoPandas data,
45
+ GeoParquet files, and DuckDB spatial queries using a Rust tiling engine.
46
+
47
+ Features:
48
+
49
+ - MapLibre Tiles (`mlt`) and Mapbox Vector Tiles (`mvt`)
50
+ - Multi-layer tilesets
51
+ - Point clustering
52
+ - Feature coalescing
53
+ - Exponential feature dropping for low zoom levels
54
+
55
+ ## Why this package exists
56
+
57
+ - Python-native API backed by the same Rust tiler as the R package
58
+ - PMTiles output instead of tile directory trees
59
+ - Direct DuckDB SQL tiling
60
+ - Streaming point tiling for large DuckDB query results
61
+
62
+ ## Installation
63
+
64
+ Install from PyPI:
65
+
66
+ ```bash
67
+ pip install freestiler
68
+ ```
69
+
70
+ Published PyPI wheels ship the native feature set:
71
+
72
+ - GeoPandas input
73
+ - Multi-layer tiling and feature management
74
+ - Direct GeoParquet file input
75
+ - DuckDB-backed file input
76
+ - DuckDB SQL query support
77
+
78
+ If a wheel is not available for your platform, `pip` will build from source and
79
+ requires a Rust toolchain.
80
+
81
+ ## Quick Start
82
+
83
+ ```python
84
+ import geopandas as gpd
85
+ from freestiler import freestile
86
+
87
+ gdf = gpd.read_file("counties.shp")
88
+
89
+ freestile(gdf, "counties.pmtiles", layer_name="counties")
90
+ ```
91
+
92
+ That example is intentionally small. The more interesting path is tiling
93
+ directly from DuckDB:
94
+
95
+ ```python
96
+ from freestiler import freestile_query
97
+
98
+ freestile_query(
99
+ query="SELECT * FROM read_parquet('blocks.parquet') WHERE state = 'NC'",
100
+ output="nc_blocks.pmtiles",
101
+ layer_name="blocks",
102
+ )
103
+ ```
104
+
105
+ For very large point tables, use `streaming="always"` and prefer
106
+ `tile_format="mvt"` for maximum viewer compatibility.
107
+
108
+ ## Source Builds
109
+
110
+ Published wheels include GeoParquet and DuckDB support by default. To build
111
+ from a local checkout:
112
+
113
+ ```bash
114
+ git clone https://github.com/walkerke/freestiler.git
115
+ cd freestiler/python
116
+ python3 -m venv .venv
117
+ source .venv/bin/activate
118
+ pip install maturin
119
+ python3 -m maturin develop --release
120
+ ```
121
+
122
+ To build an installable wheel instead of using an editable install:
123
+
124
+ ```bash
125
+ python3 -m maturin build --release --out dist
126
+ pip install dist/freestiler-*.whl
127
+ ```
128
+
129
+ ## Links
130
+
131
+ - Documentation: https://walker-data.com/freestiler/articles/python.html
132
+ - Source: https://github.com/walkerke/freestiler
133
+ - Issues: https://github.com/walkerke/freestiler/issues
134
+
@@ -0,0 +1,92 @@
1
+ # freestiler for Python
2
+
3
+ `freestiler` builds PMTiles vector tile archives from GeoPandas data,
4
+ GeoParquet files, and DuckDB spatial queries using a Rust tiling engine.
5
+
6
+ Features:
7
+
8
+ - MapLibre Tiles (`mlt`) and Mapbox Vector Tiles (`mvt`)
9
+ - Multi-layer tilesets
10
+ - Point clustering
11
+ - Feature coalescing
12
+ - Exponential feature dropping for low zoom levels
13
+
14
+ ## Why this package exists
15
+
16
+ - Python-native API backed by the same Rust tiler as the R package
17
+ - PMTiles output instead of tile directory trees
18
+ - Direct DuckDB SQL tiling
19
+ - Streaming point tiling for large DuckDB query results
20
+
21
+ ## Installation
22
+
23
+ Install from PyPI:
24
+
25
+ ```bash
26
+ pip install freestiler
27
+ ```
28
+
29
+ Published PyPI wheels ship the native feature set:
30
+
31
+ - GeoPandas input
32
+ - Multi-layer tiling and feature management
33
+ - Direct GeoParquet file input
34
+ - DuckDB-backed file input
35
+ - DuckDB SQL query support
36
+
37
+ If a wheel is not available for your platform, `pip` will build from source and
38
+ requires a Rust toolchain.
39
+
40
+ ## Quick Start
41
+
42
+ ```python
43
+ import geopandas as gpd
44
+ from freestiler import freestile
45
+
46
+ gdf = gpd.read_file("counties.shp")
47
+
48
+ freestile(gdf, "counties.pmtiles", layer_name="counties")
49
+ ```
50
+
51
+ That example is intentionally small. The more interesting path is tiling
52
+ directly from DuckDB:
53
+
54
+ ```python
55
+ from freestiler import freestile_query
56
+
57
+ freestile_query(
58
+ query="SELECT * FROM read_parquet('blocks.parquet') WHERE state = 'NC'",
59
+ output="nc_blocks.pmtiles",
60
+ layer_name="blocks",
61
+ )
62
+ ```
63
+
64
+ For very large point tables, use `streaming="always"` and prefer
65
+ `tile_format="mvt"` for maximum viewer compatibility.
66
+
67
+ ## Source Builds
68
+
69
+ Published wheels include GeoParquet and DuckDB support by default. To build
70
+ from a local checkout:
71
+
72
+ ```bash
73
+ git clone https://github.com/walkerke/freestiler.git
74
+ cd freestiler/python
75
+ python3 -m venv .venv
76
+ source .venv/bin/activate
77
+ pip install maturin
78
+ python3 -m maturin develop --release
79
+ ```
80
+
81
+ To build an installable wheel instead of using an editable install:
82
+
83
+ ```bash
84
+ python3 -m maturin build --release --out dist
85
+ pip install dist/freestiler-*.whl
86
+ ```
87
+
88
+ ## Links
89
+
90
+ - Documentation: https://walker-data.com/freestiler/articles/python.html
91
+ - Source: https://github.com/walkerke/freestiler
92
+ - Issues: https://github.com/walkerke/freestiler/issues
@@ -0,0 +1,64 @@
1
+ [build-system]
2
+ requires = ["maturin>=1.7,<2.0"]
3
+ build-backend = "maturin"
4
+
5
+ [project]
6
+ name = "freestiler"
7
+ version = "0.1.4"
8
+ description = "Rust-powered MLT/MVT vector tile engine for Python"
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = {text = "MIT"}
12
+ license-files = ["LICENSE.md"]
13
+ authors = [
14
+ {name = "Kyle Walker", email = "kyle@walker-data.com"},
15
+ ]
16
+ keywords = ["gis", "geospatial", "maplibre", "mvt", "pmtiles", "vector-tiles"]
17
+ classifiers = [
18
+ "Development Status :: 3 - Alpha",
19
+ "Intended Audience :: Developers",
20
+ "Intended Audience :: Science/Research",
21
+ "License :: OSI Approved :: MIT License",
22
+ "Programming Language :: Python :: 3",
23
+ "Programming Language :: Python :: 3.9",
24
+ "Programming Language :: Python :: 3.10",
25
+ "Programming Language :: Python :: 3.11",
26
+ "Programming Language :: Python :: 3.12",
27
+ "Programming Language :: Rust",
28
+ "Topic :: Scientific/Engineering :: GIS",
29
+ "Typing :: Typed",
30
+ ]
31
+ dependencies = [
32
+ "geopandas>=0.14",
33
+ "shapely>=2.0",
34
+ "pyproj>=3.0",
35
+ "numpy>=1.24",
36
+ ]
37
+
38
+ [project.urls]
39
+ Homepage = "https://walker-data.com/freestiler/"
40
+ Documentation = "https://walker-data.com/freestiler/articles/python.html"
41
+ Repository = "https://github.com/walkerke/freestiler"
42
+ Issues = "https://github.com/walkerke/freestiler/issues"
43
+
44
+ [project.optional-dependencies]
45
+ test = [
46
+ "pyarrow>=14",
47
+ "pytest>=7.0",
48
+ ]
49
+ dev = [
50
+ "build>=1.2",
51
+ "maturin>=1.7,<2.0",
52
+ "pyarrow>=14",
53
+ "pytest>=7.0",
54
+ "twine>=5.1",
55
+ ]
56
+
57
+ [tool.maturin]
58
+ features = ["pyo3/extension-module"]
59
+ module-name = "freestiler._freestiler"
60
+ manifest-path = "python/Cargo.toml"
61
+ python-source = "python"
62
+
63
+ [tool.pytest.ini_options]
64
+ testpaths = ["tests"]