Skip to main content

Torch Geopooling - The geospatial pooling library for PyTorch

The Torch Geopooling library is an extension for PyTorch library that provide extra layers for building geospatial neural networks.

Here is an example of how you can use modules from Torch Geopooling library to train neural networks predicting geospatial features: example

Installation

The library is distributed as PyPI package, to install that package, execute the following command:

pip install torch_geopooling

You can use the torch_geopooling library for building neural networks with geospatial indexing. The interface of the provided modules is compatible with PyTorch library, including automatic gradient computation.

Documentation

The Torch Geopooling Documentation contains additional details on how to get started with this library as well a few examples of training neural networks that use geo-pooling modules.

Usage

The module provides adaptive and regular modules that implement decomposition of point coordinates in 2-dimensional space. Decomposition in this context implies separation of the space into rectangles (quads).

Adaptive modules are building the decomposition during the training, while for regular modules the decomposition should be computed beforehand. As a result, adaptive module builds sparse decomposition, while regular module builds dense (regular) decomposition.

Using adaptive decomposition module for EPSG:4326 coordinates:

import torch
from torch_geopooling.nn import AdaptiveQuadPool2d

# Create 5-feature vector for each node in a decomposition.
pool = AdaptiveQuadPool2d(5, (-180, -90, 360, 180), max_depth=12, capacity=10)
input = torch.DoubleTensor(1024, 2).uniform_(-90, 90)
output = pool(input)

Using regular decomposition module for arbitrary polygon:

import torch
from shapely import Polygon
from torch_geopooling.nn import QuadPool2d

# Polygon for regular decomposition should be within an exterior boundary.
poly = Polygon([(0.0, 0.0), (10.0, 0.0), (10.0, 10.0), (0.0, 10.0)])
exterior = (-100.0, -100.0, 200.0, 200.0)
# Create 3-feature vector for each node in a decomposition.
pool = QuadPool2d(3, poly, exterior, max_depth=10)
input = torch.DoubleTensor(200, 2).uniform_(0.0, 10.0)
output = pool(input)

Using 2-dimensional embedding module for learning data on sphere:

import torch
from torch_geopooling.nn import Embedding2d

embedding = Embedding2d((16, 16, 2), padding=(3, 3), exterior=(-100, 100, 200.0, 200.0))
input = torch.DoubleTensor(1024, 2).normal_(5.0, 1.0)
output = embedding(input)

License

The Torch Geopooling is distributed under GPLv3 license. See the LICENSE file for full license text.

Metadata

Release files for torch-geopooling 1.3.1

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 torch-geopooling 1.3.1
File
torch_geopooling-1.3.1-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details
torch_geopooling-1.3.1-cp313-cp313-manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ ARM64 Details
torch_geopooling-1.3.1-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
torch_geopooling-1.3.1-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details
torch_geopooling-1.3.1-cp312-cp312-manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ ARM64 Details
torch_geopooling-1.3.1-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
torch_geopooling-1.3.1-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details
torch_geopooling-1.3.1-cp311-cp311-manylinux_2_28_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ ARM64 Details
torch_geopooling-1.3.1-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
torch_geopooling-1.3.1-cp310-cp310-manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64 Details
torch_geopooling-1.3.1-cp310-cp310-manylinux_2_28_aarch64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ ARM64 Details
torch_geopooling-1.3.1-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details

Total release size: 10.5 MB

Release files / torch_geopooling-1.3.1-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL torch_geopooling-1.3.1-cp313-cp313-manylinux_2_28_x86_64.whl
Size 1.1 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
cad66646a9e8bb9ac9ab057cfbe658a8cf87d2108678f8866e0766bc8d0722f4
BLAKE2b-256 checksum
How to use checksums
4070e983ebf9dcda8252dffabc67781dbd96176cfc4f79078b56b981fb9031b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Nov 22, 2025.

Transparency log

Release files / torch_geopooling-1.3.1-cp313-cp313-manylinux_2_28_aarch64.whl

Download URL torch_geopooling-1.3.1-cp313-cp313-manylinux_2_28_aarch64.whl
Size 1.0 MB
Tags CPython 3.13 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
75770e86aba6dc807115bc3ab3b7a5fb70422462ca50060307af6894f7fd59a7
BLAKE2b-256 checksum
How to use checksums
8cfb8fddf19eec7ad9b30daabf9d3474a80f5a0719f0343b0f0181cc242cbcc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Nov 22, 2025.

Transparency log

Release files / torch_geopooling-1.3.1-cp313-cp313-macosx_11_0_arm64.whl

Download URL torch_geopooling-1.3.1-cp313-cp313-macosx_11_0_arm64.whl
Size 507.6 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1d105596dec4adc8d3bb5487863ff4c5d9ac40f5cbfeb83c026771dc0a12045c
BLAKE2b-256 checksum
How to use checksums
dec12a77c18fa8df5e149ea6581ff6c6b9cc6e92482d8d3b487e49a3693e7e5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Nov 22, 2025.

Transparency log

Release files / torch_geopooling-1.3.1-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL torch_geopooling-1.3.1-cp312-cp312-manylinux_2_28_x86_64.whl
Size 1.1 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
066c5e98e621e40834db7f4fa0e8f82cd235ac8517c38f250683ea62aaa7b02d
BLAKE2b-256 checksum
How to use checksums
62282957ff7df0940ea8fb7e4f127e75d5ca536c021c7b33a9ee5fede403fa2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Nov 22, 2025.

Transparency log

Release files / torch_geopooling-1.3.1-cp312-cp312-manylinux_2_28_aarch64.whl

Download URL torch_geopooling-1.3.1-cp312-cp312-manylinux_2_28_aarch64.whl
Size 1.0 MB
Tags CPython 3.12 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
cb7177010a34ae63a6a783da6e86ae34c18b090e917b3ba1376230a12d58201a
BLAKE2b-256 checksum
How to use checksums
2837e71d201cbfa7e6c43b3adcac185488980fee738b07de332da261c8b41613
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Nov 22, 2025.

Transparency log

Release files / torch_geopooling-1.3.1-cp312-cp312-macosx_11_0_arm64.whl

Download URL torch_geopooling-1.3.1-cp312-cp312-macosx_11_0_arm64.whl
Size 507.6 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a801a77eb652f6a5c764a9c257ec4a37c2f3fdf1f96fca8fe8e5e73656882f93
BLAKE2b-256 checksum
How to use checksums
54cc50c00e270911492a2b360405b972a716e063f7c28771289e614a903ade3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Nov 22, 2025.

Transparency log

Release files / torch_geopooling-1.3.1-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL torch_geopooling-1.3.1-cp311-cp311-manylinux_2_28_x86_64.whl
Size 1.1 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
dfb2b44a4b27292227268c0c5549c5c4c239f8aca3de49245ddf3da2b9ef23f4
BLAKE2b-256 checksum
How to use checksums
03db972372cdcbe9c103b47e6d4228f17f0abb7a7e4f6f0e3f5caa5555fde5b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Nov 22, 2025.

Transparency log

Release files / torch_geopooling-1.3.1-cp311-cp311-manylinux_2_28_aarch64.whl

Download URL torch_geopooling-1.3.1-cp311-cp311-manylinux_2_28_aarch64.whl
Size 1.0 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
6009da49b5a37fe748aaf80c6dd6a9933e08daca60cc84d470c029e0e1c5518b
BLAKE2b-256 checksum
How to use checksums
b3a6ead6f54d52d1351e0d419a499421ecfd4d34ac6afaf91a4b6768cc9f163b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Nov 22, 2025.

Transparency log

Release files / torch_geopooling-1.3.1-cp311-cp311-macosx_11_0_arm64.whl

Download URL torch_geopooling-1.3.1-cp311-cp311-macosx_11_0_arm64.whl
Size 510.6 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
41445201aacda83e44a3659abf8454796f5bee8300d2ef16878aca435c6273d0
BLAKE2b-256 checksum
How to use checksums
659c8e55820ee339e2d5746798cdab4fdd97f538782dab20304d0f9a7fb8cd85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Nov 22, 2025.

Transparency log

Release files / torch_geopooling-1.3.1-cp310-cp310-manylinux_2_28_x86_64.whl

Download URL torch_geopooling-1.3.1-cp310-cp310-manylinux_2_28_x86_64.whl
Size 1.1 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
899aeb1d3359ce5b623ce432dd224a82eb4f578a649b4b443c4aa98fa692f8d4
BLAKE2b-256 checksum
How to use checksums
f9ef96fcf97e208f1ffa306d272e2e156e5ca6af22f522fc2d08573eb94b7efe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Nov 22, 2025.

Transparency log

Release files / torch_geopooling-1.3.1-cp310-cp310-manylinux_2_28_aarch64.whl

Download URL torch_geopooling-1.3.1-cp310-cp310-manylinux_2_28_aarch64.whl
Size 1.0 MB
Tags CPython 3.10 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
222cdfeeac2da1c4359a5f6e2ce3bcaced64bc9244f5839e6b730d8c1bebdd45
BLAKE2b-256 checksum
How to use checksums
f8120986933c716d522c67673bbbab61a1eb143f37eb8129bec7c99dd249fc1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Nov 22, 2025.

Transparency log

Release files / torch_geopooling-1.3.1-cp310-cp310-macosx_11_0_arm64.whl

Download URL torch_geopooling-1.3.1-cp310-cp310-macosx_11_0_arm64.whl
Size 509.7 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b11595c4919f7b8444a1cd4cdeb2c21891f40724fb561d82cfb551978876e83e
BLAKE2b-256 checksum
How to use checksums
006b2b29426522e3fb63b084871f008d31ae207652013ccfe7a160a52c8f325c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Nov 22, 2025.

Transparency log
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