# verstappenrb18/poi-searchjava architecture

> Architecture diagram of the GitHub repository verstappenrb18/poi-searchjava, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/verstappenrb18/poi-searchjava
- Repository: https://github.com/verstappenrb18/poi-searchjava

## Overview

This is a small in-memory spatial place map with a console workflow for adding places, editing their service tags, removing them, and searching rectangular areas with an optional service filter. Map2D batches additions and delegates spatial operations to a quadtree; places store service selections as a bitmask. The remaining components provide geometry and custom collection abstractions. The README is empty, so the workflow and relationships shown here are based on the sampled source; unsampled quadtree behavior is not inferred.

Main entry points: [`map2D/Map2D.java`](https://github.com/verstappenrb18/poi-searchjava/blob/main/map2D/Map2D.java) (Map operations), [`quadTree/QuadTree.java`](https://github.com/verstappenrb18/poi-searchjava/blob/main/quadTree/QuadTree.java) (Quadtree index), [`arrayList/ArrayList.java`](https://github.com/verstappenrb18/poi-searchjava/blob/main/arrayList/ArrayList.java) (Dynamic array), [`place/Place.java`](https://github.com/verstappenrb18/poi-searchjava/blob/main/place/Place.java) (Place records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Map workflow"]
  node_map["Map operations<br/>[Map2D.java]"]
  node_registry["Service registry"]
end

subgraph group_spatial["Spatial model"]
  node_tree["Quadtree index<br/>[QuadTree.java]"]
  node_place["Place records<br/>[Place.java]"]
  node_rectangle["Rectangle geometry<br/>[Rectangle.java]"]
end

subgraph group_collections["Collection layer"]
  node_arraylist["Dynamic array<br/>[ArrayList.java]"]
  node_list["List contract<br/>[List.java]"]
  node_spatialcomparable["Spatial comparison"]
  node_iterable["Iterable contract<br/>[Iterable.java]"]
  node_iterator["Iterator contract<br/>[Iterator.java]"]
end

node_user(("Console user"))

node_user -->|"uses menu"| node_map
node_map -->|"delegates operations"| node_tree
node_map -->|"creates places"| node_place
node_map -->|"looks up services"| node_registry
node_map -->|"builds search area"| node_rectangle
node_map -->|"buffers additions"| node_arraylist
node_tree -->|"tests spatial bounds"| node_rectangle
node_tree -->|"indexes and queries"| node_place
node_tree -->|"uses service types"| node_registry
node_tree -->|"stores query results"| node_arraylist
node_place -->|"resolves service names"| node_registry
node_arraylist -->|"constrains elements"| node_spatialcomparable
node_arraylist -->|"implements iteration"| node_iterable
node_arraylist -->|"provides iterator"| node_iterator
node_iterable -->|"returns iterator"| node_iterator

click node_map "https://github.com/verstappenrb18/poi-searchjava/blob/main/map2D/Map2D.java"
click node_registry "https://github.com/verstappenrb18/poi-searchjava/blob/main/place/ServiceRegistry.java"
click node_tree "https://github.com/verstappenrb18/poi-searchjava/blob/main/quadTree/QuadTree.java"
click node_place "https://github.com/verstappenrb18/poi-searchjava/blob/main/place/Place.java"
click node_rectangle "https://github.com/verstappenrb18/poi-searchjava/blob/main/rectangle/Rectangle.java"
click node_arraylist "https://github.com/verstappenrb18/poi-searchjava/blob/main/arrayList/ArrayList.java"
click node_list "https://github.com/verstappenrb18/poi-searchjava/blob/main/arrayList/List.java"
click node_spatialcomparable "https://github.com/verstappenrb18/poi-searchjava/blob/main/comparable/SpatialComparable.java"
click node_iterable "https://github.com/verstappenrb18/poi-searchjava/blob/main/iterable/Iterable.java"
click node_iterator "https://github.com/verstappenrb18/poi-searchjava/blob/main/iterable/Iterator.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_map,node_registry,node_user toneBlue
class node_tree,node_place,node_rectangle toneAmber
class node_arraylist,node_list,node_spatialcomparable,node_iterable,node_iterator toneMint
```

## Components

### Map workflow

- [Map operations](https://github.com/verstappenrb18/poi-searchjava/blob/main/map2D/Map2D.java): `map2D/Map2D.java`
- [Service registry](https://github.com/verstappenrb18/poi-searchjava/blob/main/place/ServiceRegistry.java): `place/ServiceRegistry.java`

### Spatial model

- [Quadtree index](https://github.com/verstappenrb18/poi-searchjava/blob/main/quadTree/QuadTree.java): `quadTree/QuadTree.java`
- [Place records](https://github.com/verstappenrb18/poi-searchjava/blob/main/place/Place.java): `place/Place.java`
- [Rectangle geometry](https://github.com/verstappenrb18/poi-searchjava/blob/main/rectangle/Rectangle.java): `rectangle/Rectangle.java`

### Collection layer

- [Dynamic array](https://github.com/verstappenrb18/poi-searchjava/blob/main/arrayList/ArrayList.java): `arrayList/ArrayList.java`
- [List contract](https://github.com/verstappenrb18/poi-searchjava/blob/main/arrayList/List.java): `arrayList/List.java`
- [Spatial comparison](https://github.com/verstappenrb18/poi-searchjava/blob/main/comparable/SpatialComparable.java): `comparable/SpatialComparable.java`
- [Iterable contract](https://github.com/verstappenrb18/poi-searchjava/blob/main/iterable/Iterable.java): `iterable/Iterable.java`
- [Iterator contract](https://github.com/verstappenrb18/poi-searchjava/blob/main/iterable/Iterator.java): `iterable/Iterator.java`

### Other components

- **Console user**

## Connections

- Console user → Map operations: uses menu (evidence: `map2D/Map2D.java`)
- Map operations → Quadtree index: delegates operations (evidence: `map2D/Map2D.java`)
- Map operations → Place records: creates places (evidence: `map2D/Map2D.java`)
- Map operations → Service registry: looks up services (evidence: `map2D/Map2D.java`)
- Map operations → Rectangle geometry: builds search area (evidence: `map2D/Map2D.java`)
- Map operations → Dynamic array: buffers additions (evidence: `map2D/Map2D.java`)
- Quadtree index → Rectangle geometry: tests spatial bounds (evidence: `quadTree/QuadTree.java`)
- Quadtree index → Place records: indexes and queries (evidence: `quadTree/QuadTree.java`)
- Quadtree index → Service registry: uses service types (evidence: `quadTree/QuadTree.java`)
- Quadtree index → Dynamic array: stores query results (evidence: `quadTree/QuadTree.java`)
- Place records → Service registry: resolves service names (evidence: `place/Place.java`)
- Dynamic array → Spatial comparison: constrains elements (evidence: `arrayList/ArrayList.java`)
- Dynamic array → Iterable contract: implements iteration (evidence: `arrayList/ArrayList.java`)
- Dynamic array → Iterator contract: provides iterator (evidence: `arrayList/ArrayList.java`)
- Iterable contract → Iterator contract: returns iterator (evidence: `iterable/Iterable.java`)
