Skip to main content
https://img.shields.io/badge/code%20style-black-000000.svg https://img.shields.io/pypi/v/genplanner.svg https://github.com/DDonnyy/GenPlanner-lib/actions/workflows/quality.yml/badge.svg https://raw.githubusercontent.com/DDonnyy/GenPlanner-lib/python-coverage-comment-action-data/badge.svg https://github.com/DDonnyy/GenPlanner-lib/actions/workflows/release.yml/badge.svg https://github.com/DDonnyy/GenPlanner-lib/actions/workflows/docs.yml/badge.svg https://img.shields.io/badge/docs-GitHub%20Pages-blue https://img.shields.io/badge/license-Non--Commercial-red.svg
GenPlanner logo

GenPlanner is a territorial zoning engine for generating spatially consistent territorial zones (and optionally blocks) from polygonal territories.

It combines:

  • ratio-based functional zoning

  • adjacency constraints via relation matrices

  • optional spatial anchor points

  • integration of existing zones

  • road-based splitting

  • MILP-based multi-feature allocation

  • geometric optimization via Voronoi splitting

Installation

pip install genplanner

Python 3.11 and 3.12 are supported.

Quick Example

import geopandas as gpd
from genplanner import GenPlanner
from genplanner.zones import basic_func_zone

territory = gpd.read_file("territory.geojson")

gp = GenPlanner(features_gdf=territory)

zones, roads = gp.features2terr_zones(
    funczone=basic_func_zone
)

Generate blocks:

blocks, roads = gp.features2terr_zones2blocks(
    funczone=basic_func_zone
)

Example with relation constraints

zones, roads = gp.features2terr_zones(
    relation_matrix="default"
)

Example with spatial anchors

from shapely.geometry import Point
from genplanner.zones import default_terr_zones

fix_points = gpd.GeoDataFrame(
    {
        "fixed_zone": [default_terr_zones.residential_terr],
        "geometry": [Point(30.1, 59.9)],
    },
    crs=territory.crs,
)

zones, roads = gp.features2terr_zones(
    terr_zones_fix_points=fix_points
)

Documentation

Full documentation is available at:

https://ddonnyy.github.io/GenPlanner-lib/

Core modules:

  • GenPlanner

  • Zones

  • Zone Relations

  • Errors

  • Configuration

Citing

If GenPlanner contributes to your work, use the citation metadata in CITATION.cff.

Design Philosophy

GenPlanner is built around a small set of composable primitives:

  • Zones define what spatial program should be achieved.

  • Relations define which zones may be adjacent.

  • The planner orchestrates preprocessing, validation and optimization.

  • Errors are explicit and structured.

The goal is deterministic, reproducible zoning with clear constraints and explicit spatial control.

License

This project is licensed under a Proprietary Non-Commercial License.

Russian version available in LICENSE_RU.txt.

Metadata

Release files for genplanner 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for genplanner 1.0.5
File Size Uploaded
genplanner-1.0.5.tar.gz 56.3 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for genplanner 1.0.5
File
genplanner-1.0.5-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
genplanner-1.0.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
genplanner-1.0.5-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
genplanner-1.0.5-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
genplanner-1.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
genplanner-1.0.5-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details

Total release size: 7.5 MB

Release files / genplanner-1.0.5.tar.gz

Download URL genplanner-1.0.5.tar.gz
Size 56.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7978cf242fdc5c94f8d86c0f0578914fa5ca1ba11c823fe405d44b539c54de01
BLAKE2b-256 checksum
How to use checksums
2007b7f0b334c8aa2968c669cefc2db65ff42f5d583cebe08dc365a276013ce5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / genplanner-1.0.5-cp312-cp312-win_amd64.whl

Download URL genplanner-1.0.5-cp312-cp312-win_amd64.whl
Size 1.2 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
5858351e0e9d44ae25f31b3e07a1e217e116fe338453cccaa5ebcc46edce957b
BLAKE2b-256 checksum
How to use checksums
761dd63de538b75d7292b672f774002e09092b254ead6e6c484e94eb39a62fe6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / genplanner-1.0.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL genplanner-1.0.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.4 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
f08500cab4478260acd8cb619e69b789ad9d84a7c7ac17662d1386c0b615ab90
BLAKE2b-256 checksum
How to use checksums
7debceaab5b6202f2a0a5b2c1538441ea5c6eb40ec73212565dafdef9cc58fe7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / genplanner-1.0.5-cp312-cp312-macosx_11_0_arm64.whl

Download URL genplanner-1.0.5-cp312-cp312-macosx_11_0_arm64.whl
Size 1.1 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
c6e1210fdfd302428a4fef688ea16f86f0f8e8468af6003ba50188ea7bb8c77a
BLAKE2b-256 checksum
How to use checksums
5906493fa04b03afb7b64f5a9aef60aaf359220554f0b0f618463bbe46a2b3f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / genplanner-1.0.5-cp311-cp311-win_amd64.whl

Download URL genplanner-1.0.5-cp311-cp311-win_amd64.whl
Size 1.2 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
865346cd8f71788b9822d0644c2ce4e898fb0f52047665c8bdd7363710d4dac1
BLAKE2b-256 checksum
How to use checksums
ee794eb87d75bb2deda48c97a81b1f7e2b95f7aa9eae1de86fd9156629f3652a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / genplanner-1.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL genplanner-1.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.4 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
3ff06d5a00682d714adf0d343fbcb84148016f28e986141e6f88f0de21efd0bd
BLAKE2b-256 checksum
How to use checksums
fe8a08f9a6886075b452d0c088f0ae356fc017e8d6035ecb198f46babc2b5531
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / genplanner-1.0.5-cp311-cp311-macosx_11_0_arm64.whl

Download URL genplanner-1.0.5-cp311-cp311-macosx_11_0_arm64.whl
Size 1.1 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
14d16471c27e806a425b79e08588835896a575c822f256b1259dfe8c04eabd0d
BLAKE2b-256 checksum
How to use checksums
e938f90924e2b0f7ffa734a367ca5980ea22adb658e0e34743b743a6e3b3e9b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release history Release notifications | RSS feed

1.0.6

7 release files

This release

1.0.5 This release

7 release files

1.0.4

6 release files

1.0.3

6 release files

1.0.2

6 release files

1.0.1

6 release files

1.0.0

6 release files

0.1.4

6 release files

0.1.2

6 release files

0.1.1

6 release files

0.1.0

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page