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.4

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

Built distributions (wheels)

Table of built distributions (wheels) for genplanner 1.0.4
File
genplanner-1.0.4-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
genplanner-1.0.4-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.4-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
genplanner-1.0.4-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
genplanner-1.0.4-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.4-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.4-cp312-cp312-win_amd64.whl

Download URL genplanner-1.0.4-cp312-cp312-win_amd64.whl
Size 1.2 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
bf09d84e8983b2dd8d1421d5fc54c5018381afe4d69b891a0f3a6f2a05a85f7f
BLAKE2b-256 checksum
How to use checksums
f01ec8f56194f8b0b0fe339627e1504cf2d1c44580dcfe96d99eb8bceb5f1c38
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.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL genplanner-1.0.4-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
313d5abcd98be7fa41ad195b1c640c588b2ff96355844c1e6e6d35b4a79d9201
BLAKE2b-256 checksum
How to use checksums
0a2313a7ad0229598a4990b0cdef2dc27f150a418368a823a85994684f0948b8
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.4-cp312-cp312-macosx_11_0_arm64.whl

Download URL genplanner-1.0.4-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
8dcf7c54add0ea0d3da25fc14c9671371487857b54724ebed2f775059d2a06d0
BLAKE2b-256 checksum
How to use checksums
4d5b0112c2185f03232a085049f7dff469ecb9d5d39da7cf798985a5bcc9e976
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.4-cp311-cp311-win_amd64.whl

Download URL genplanner-1.0.4-cp311-cp311-win_amd64.whl
Size 1.2 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
2cd759d73a42a33eb8d50ed8516e0ba49e6e414bef85c3ae8627f7bd7431b543
BLAKE2b-256 checksum
How to use checksums
a76d62418dc6b4ef4f38e23c53055a7af16aa4f3f07bb19e8ca05c358ef856a9
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.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL genplanner-1.0.4-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
dd4c6bbcee3294bbe5058b897132f09fd3a75996709e4a62d49585a2c751e864
BLAKE2b-256 checksum
How to use checksums
2de878e3489dc2960ffe7892477af6b2ce2e3a6fd288aef347059e78e918a06b
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.4-cp311-cp311-macosx_11_0_arm64.whl

Download URL genplanner-1.0.4-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
5a4ddb0ea38431f4112cea34be310cdb7a8ef5ba8514b14bd9a8cd85cc2f568d
BLAKE2b-256 checksum
How to use checksums
42d35aa61cfd95f5ea5fe0966bf95ba1e9a150b695fd4d94975b7fbed2e1a591
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

1.0.5

7 release files

This release

1.0.4 This release

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