Skip to main content

No project description provided

Project description

RetailTree

RetailTree is a Python library designed for efficient management and querying of spatial data utilizing a tree-based data structure. Specifically, RetailTree employs a VP (Vantage Point) tree for optimized spatial data management.

Key Features

  • Nearest Neighbor Search: RetailTree enables finding the nearest neighbors in 2D space.
  • Tree-Based Structure: Utilizes a VP tree for optimized spatial data management.
  • Top, Right, Left, and Bottom Annotations: Supports retrieval of annotations based on their relative positions.
  • Annotations within Angle Range: Provides functionality to retrieve annotations within a specified angle range relative to a reference point.

Installation

You can install retailTree via pip:

1) clone the repo
2) cd retailTree
3) pip install retailTree-0.0.1-py3-none-any.whl

Usage

from retailTree import retailTree, Annotation
from retailTree.utils.dist_func import manhattan, euclidean

obj = RetailTree()

# Adding annotations
obj.add_annotation(id=1, x_min=1, y_min=1, x_max=1, y_max=1)
obj.add_annotation(id=2, x_min=2, y_min=2, x_max=2, y_max=2)

# Tree Building
obj.build_tree(dist_func=manhattan)

# Get neighbors-annotations within radius
obj.find_neighbors(id=961360402, radius=1)

# Get Top, Bottom, Right, Left annotations
obj.TBLR(id=961360402, radius=1.4)

# Get neighboring annotations within a particular angle range
obj.get_neighbors_within_angle(
        id=963804130, radius=1, min_angle=0, max_angle=90)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

retailtree-1.1.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

retailtree-1.1-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file retailtree-1.1.tar.gz.

File metadata

  • Download URL: retailtree-1.1.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for retailtree-1.1.tar.gz
Algorithm Hash digest
SHA256 a5b1bcc98902765ee7933e2a6364f0604b05a6ec9f84ace661d4a9220f1228df
MD5 7e33723f10158b0ea62d8c3b8b3c83ff
BLAKE2b-256 710968d75bc3c475637295d08c14985ebf8ba753db9387b9bbd742bdfdfcfadb

See more details on using hashes here.

File details

Details for the file retailtree-1.1-py3-none-any.whl.

File metadata

  • Download URL: retailtree-1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for retailtree-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eeef89d0e9a791bb61e7f6017379178b277c691e48687a0cd9f22e7b2f0497ae
MD5 a4f1969eaaebc5dbdbbf3eb4a5e322e6
BLAKE2b-256 21a256b34b594e2c9ce77facf573726f504538392c53aade4eb33c8f0534203b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page