Metadata-Version: 2.4
Name: orange-gis
Version: 0.3.0
Summary: GIS analysis and interactive mapping widgets for Orange
Author-email: Daeyong Shin <anespart1@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/anespart1
Keywords: orange3,gis,geopandas,spatial-analysis,mapping
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: X11 Applications :: Qt
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: GIS
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Orange3>=3.39
Requires-Dist: Orange3-Text>=1.16.3
Requires-Dist: centerline>=1.1
Requires-Dist: esda>=2.6
Requires-Dist: folium>=0.17
Requires-Dist: geopandas>=1.0
Requires-Dist: geopy>=2.4
Requires-Dist: jinja2>=3.1
Requires-Dist: libpysal>=4.12
Requires-Dist: mapclassify>=2.8
Requires-Dist: networkx>=3.2
Requires-Dist: numpy>=1.26
Requires-Dist: openai>=1.66
Requires-Dist: osmnx>=2.0
Requires-Dist: pandas>=2.1
Requires-Dist: pyproj>=3.6
Requires-Dist: scikit-learn>=1.4
Requires-Dist: shapely>=2.0
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == "dev"
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: pytest-qt>=4.4; extra == "dev"
Requires-Dist: ruff>=0.6; extra == "dev"
Dynamic: license-file

# Orange GIS

Orange GIS is an Orange add-on for loading, transforming, analysing, and
visualising geospatial data. The distribution name is `orange-gis`; its Python
package is `orangecontrib.orange_gis` because Python module names cannot contain
hyphens.

## Installation

Build or download `orange_gis-0.3.0-py3-none-any.whl`, then install it through
Orange's **Options → Add-ons** interface. The package declares its Python
dependencies, so a separate Conda or Miniconda setup step is not part of the
installation procedure.

For development, run pip with the Python interpreter that belongs to the target
Orange installation:

```powershell
<orange-python> -m pip install -e ".[dev]"
```

Orange GIS 0.3 requires Python 3.11 or newer and Orange 3.39 or newer. The
current release target is Orange 3.40.

## Map architecture

Interactive maps remain embedded in the Orange widget with `QWebEngineView`.
That browser component is still necessary to render Leaflet/Folium HTML inside
Orange; the browser-to-Python Qt WebChannel bridge is not.

One in-process HTTP service is shared by all open map widgets:

1. The first map widget starts a server bound to `127.0.0.1` on a random port.
2. Every widget receives a private session ID and random token.
3. `QWebEngineView` loads the map over HTTP instead of receiving it through
   `setHtml()`.
4. Interactive marker events return as token-protected JSON POST requests.
5. Closing the last map widget schedules automatic server shutdown.
6. Orange shutdown immediately closes the server.

There is no server subprocess, console window, iframe wrapper, temporary HTML
file, or Qt WebChannel object. Loading the document as an HTTP response also
removes the data-URL size path that affected large generated maps.

## Package layout

- `orangecontrib.orange_gis.geo`: shared GeoDataFrame validation and CRS helpers
- `orangecontrib.orange_gis.web`: loopback server, map sessions, and web panel
- `orangecontrib.orange_gis.widgets`: 30 Orange widgets and packaged resources
- `tests`: server lifecycle, metadata, source-integrity, and Orange Table tests

All Qt imports go through AnyQt. GIS operations use explicit GeoDataFrame,
NetworkX graph, or Orange Table signal types, and result-producing text widgets
retain the source table before appending their result columns.

## OpenAI toponym extraction

The extraction widget uses the OpenAI Responses API and strict JSON-schema
output. Its default model is `gpt-5.6-sol`, while the model field remains
editable. API keys are kept only in the widget's in-memory password field or
read from `OPENAI_API_KEY`; they are not stored in Orange settings.

## Build and validation

```powershell
<orange-python> -m pip wheel --no-deps --no-build-isolation --wheel-dir dist .
<orange-python> -m pytest
```

The source tree intentionally excludes generated maps, caches, build
directories, and unused prototype assets.
