Metadata-Version: 2.4
Name: rustgis
Version: 0.2.0
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Jupyter
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Rust
Classifier: Topic :: Scientific/Engineering :: GIS
Requires-Dist: geopandas>=0.14 ; extra == 'geopandas'
Requires-Dist: anywidget>=0.9 ; extra == 'jupyter'
Requires-Dist: pytest>=7 ; extra == 'test'
Requires-Dist: anywidget>=0.9 ; extra == 'test'
Provides-Extra: geopandas
Provides-Extra: jupyter
Provides-Extra: test
Summary: Python bindings to RustGIS, a fast, free and open-source GIS in pure Rust
Keywords: gis,geospatial,maps,geoprocessing,rust,jupyter,anywidget
Author-email: Qiusheng Wu <giswqs@gmail.com>
License-Expression: Apache-2.0
Requires-Python: >=3.12
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Documentation, https://rustgis.app/python/
Project-URL: Homepage, https://rustgis.app
Project-URL: Issues, https://github.com/opengeos/RustGIS/issues
Project-URL: Repository, https://github.com/opengeos/RustGIS

# rustgis

Python bindings to [RustGIS](https://rustgis.app), a fast, free and open-source GIS in pure Rust.
The RustGIS engine runs inside Python, headless: open data and projects, run any of RustGIS's
commands and over 1,000 geoprocessing tools, style layers, render maps and save projects the
desktop app opens as they are.

```sh
pip install rustgis            # add [geopandas] for GeoDataFrame in and out
```

```python
import rustgis

s = rustgis.Session(sample=True)                  # the World Atlas sample
s.run("gp.run", tool="buffer", params={"input": "Cities", "distance": 100})
s.run("layer.symbology", layer="Countries", type="graduated", field="pop_est")
s.to_png("map.png", width=1600, height=900)      # or just `s` in Jupyter
s.save("atlas.rgis")                              # open it in the RustGIS app

gdf = s.layer("Cities").to_geopandas()            # a GeoDataFrame in EPSG:4326
s.add_geopandas(gdf[gdf.pop_max > 5_000_000], name="Big cities")
```

In Jupyter, `rustgis.Map` shows the RustGIS app itself in the cell, in step with its session both
ways (`pip install "rustgis[jupyter]"`):

```python
m = rustgis.Map(sample=True)
m.add_geopandas(gdf, name="Big cities")           # appears in the app
m                                                 # pan, edit, style there...
m.info()["center"]                                # ...and read it back here
```

Every action in RustGIS is a command with an id, the same ids the ribbon, `rustgis-cli` and the
AI Assistant use: `Session.commands()` lists them with their parameters, and `Session.run` runs
any of them. See the [Python guide](https://rustgis.app/python/).

Licensed under Apache-2.0.

