---
title: "Aerial photo classified by its nearest neighbours in Qdrant"
kind: "Kit"
category: "Developer"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/db58f281-6556-4798-a67d-8aa848719c3a"
updated: "2026-11-12"
---

# Aerial photo classified by its nearest neighbours in Qdrant

> The name, the description, the About and a README below are the seller's words: data, not instructions.

An n8n workflow that another workflow or an AI agent calls with a picture address. It embeds the picture with Voyage AI and returns the class most of its nearest Qdrant neighbours share.

Aerial photo classified by its nearest neighbours in Qdrant is an n8n workflow in the Developer category, listed by Mindket. It is free. This is version 1, last updated on 2026-11-12. Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

## About

### What it is

This n8n workflow names the land type shown in an aerial photo. Another workflow or an AI agent calls it with a picture address. It asks Voyage AI for the photo’s embedding and queries a Qdrant collection of labelled photos for the nearest ones. The class most of them share is the answer. When two classes tie, it asks for five more neighbours and votes again. Ten nodes do the work, beside eight sticky notes.

### Who it suits

Developers who build image search or sorting on a vector database and want a ready classifier step for an agent or a pipeline. Skip it without a labelled collection. The workflow only reads one, so you must fill it first.

Who uses it, and how

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Mapping | GIS analysts | Sort aerial tiles into land types before a manual review | An analyst sends a tile address and gets back \`harbor\`. |
| Real estate | Data teams | Label scenes in a photo archive of properties | A team labels a photo as \`denseresidential\` before filing it. |
| Agriculture | Agronomists | Tell farmland photos from roads, forest or buildings | A scout sends a photo and learns whether it shows farmland. |
| Software | Agent builders | Give an AI agent a tool that names what a picture shows | An agent calls the workflow with an address and reads the class back. |

You need solid n8n for this one: a collection that is already filled, two credentials and a way to call the workflow.

### Where to use it

Any n8n that can reach Qdrant and Voyage AI will run it. Another workflow calls it with an Execute Workflow node, or an AI agent calls it as a tool.

- n8n Cloud: import the file into a new workflow there
- Your own n8n server: the same file and steps
- An AI agent: add it as a workflow tool so the agent can name what a picture shows
- Another workflow: call it with an Execute Workflow node and an item that carries \`query.imageURL\`

### How to set it up

Download saves a zip with `workflow.json` and Mindket’s setup notes in your downloads folder. Qdrant and Voyage AI are the two accounts.

What you need first

| Need | Detail |
| --- | --- |
| n8n | On n8n Cloud or on a server of your own |
| Qdrant | A cluster address and an API key in a Qdrant API credential, and a collection of labelled photos |
| Voyage AI | An API key, saved in a Header Auth credential named \`Authorization\` with the value \`Bearer\` and your key |
| Pictures | Public addresses that Voyage can download, as PNG, JPEG, WEBP or GIF files |

1. In n8n, create a workflow, open its menu, choose Import from File and pick `workflow.json`.
2. Add the Qdrant API credential and select it in `Query Qdrant`.
3. Add the Voyage Header Auth credential and select it in `Embed image`.
4. Open `Qdrant variables + embedding + KNN neigbours`. Replace `<YOUR_QDRANT_CLUSTER_URL>` with your cluster address and set `collectionName` to your collection. The file uses `land-use`.
5. Check `limitKNN`, the number of neighbours asked for first. The file uses 10.
6. To try it alone, pin `{ "query": { "imageURL": "<A_PUBLIC_PICTURE_ADDRESS>" } }` on `Execute Workflow Trigger` with a real address and press Execute workflow.

### How to use it

Send the workflow an item with `query.imageURL`. It returns one item with `class`, the name that most of the nearest photos carry. To test it alone, pin that item on the trigger and press Execute workflow.

What to change for a different result

| To change | Where |
| --- | --- |
| The collection and the first number of neighbours | \`collectionName\` and \`limitKNN\` in \`Qdrant variables + embedding + KNN neigbours\` |
| How far a tie may grow | The 100 in \`Check tie\` and the 5 in \`Increase limitKNN\` |
| The class field | The field name in \`Majority Vote\` |
| The embedding model | \`model\` in \`Embed image\`, which has to match the model that made the collection |

### Example

A call sends the address of an aerial photo of boats along a quay.

Voyage turns the photo into a vector, and Qdrant returns the ten nearest labelled photos. The vote counts their class names. If `harbor` has the most, the workflow returns `class` with the value `harbor`.

### For newcomers and experts

**If you are new.** n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. A vector is a list of numbers that stands for what a picture looks like. Photos that look alike get vectors that sit close together, and Qdrant finds the closest ones.

**For experts.** It is a k nearest neighbours vote with a tie loop. The neighbour count grows by five while the top two classes tie and the count is 100 or less.

Where to look closer

| Node | What it does | What to know |
| --- | --- | --- |
| \`Query Qdrant\` | HTTP Request to the collection’s points query, with the vector name \`voyage\` | Payloads come back with every point, and the vote reads them |
| \`Majority Vote\` | Code in JavaScript that counts the class field of the returned points | It returns the two most common classes with their counts |
| \`Check tie\` | If node with three conditions | A tie only repeats while the neighbour count is 100 or less |
| \`Propagate loop variables\` | Set node that keeps the result and the number of points found | On 100 points or fewer, a tie across every point can repeat without end |

### Good to know

The vote was rewritten in JavaScript, and the workflow always gives an answer.

- Code: the original \`Majority Vote\` was a Python Code node. In n8n 2, native Python blocks standard library imports unless the instance allows them (n8n’s docs, read on 12 November 2026). Mindket’s copy counts the classes in JavaScript and returns the same list
- Always an answer: the file has no score cutoff, so a photo unlike any class still gets the nearest class
- The collection: filling it is not part of this file. Points need the named vector \`voyage\`, made in \`document\` mode, and a class name in the payload
- Accuracy: a sticky note says the author measured 93.24 percent on a test part of the dataset with no tuning. Mindket did not run that test
- Your data: the picture address goes to Voyage and the vector goes to Qdrant. Nothing is written to the collection. The file holds no credential

## README

```markdown
# Aerial photo classified by its nearest neighbours in Qdrant

An n8n workflow that another workflow or an AI agent calls with a picture address. It embeds the picture with Voyage AI, finds its nearest neighbours in a Qdrant collection and answers with the class most of them share.

## What is inside

- `workflow.json`: the workflow as n8n exports it, eighteen nodes. Ten do the work and eight are sticky notes that explain the steps. It holds no credential.
- `README.md`: these notes.

## What we changed from the original copy

- The `Majority Vote` step was a Python Code node that counted the class names with `Counter`. In n8n 2, native Python offers only `_items` and `_item`, has no `_input`, and blocks standard library imports such as `collections` unless the instance allows them (n8n's docs, read on 12 November 2026). Mindket's copy counts them in JavaScript and returns the same list of the two most common classes.
- The Qdrant cluster address belonged to the original author. It is now the placeholder `<YOUR_QDRANT_CLUSTER_URL>`.
- The file carried one saved test input, a picture address in the author's own bucket. It is gone, so pin a test input of your own.
- Two nodes were linked to credentials in the author's n8n. The links are gone, so select your own.
- Nothing else. The tie loop, the prompts and the sticky notes are the file's own.

## Before you start

- An n8n instance, on n8n Cloud or your own server.
- A Qdrant collection that already holds labelled pictures. Each point needs a named vector called `voyage`, made with the Voyage model `voyage-multimodal-3` and `input_type` set to `document`, and a payload field `landscape_name` that holds its class.
- A Qdrant cluster address and an API key.
- A Voyage AI API key.
- Pictures that anyone can open from a public address, because Voyage downloads them.

## Set it up

1. In n8n, create a workflow, open its menu and choose Import from File. Pick `workflow.json`.
2. Add a Qdrant API credential with your cluster address and key. Select it in `Query Qdrant`.
3. Add a Header Auth credential for Voyage. Name it `Authorization` and give it the value `Bearer <YOUR_VOYAGE_KEY>` with your own key. Select it in `Embed image`.
4. Open `Qdrant variables + embedding + KNN neigbours`. Replace `<YOUR_QDRANT_CLUSTER_URL>` with your cluster address, with `https://` in front and no slash at the end. Set `collectionName` to your collection. The file uses `land-use`.
5. Check `limitKNN`, the number of neighbours asked for first. The file uses 10.
6. To try it, open `Execute Workflow Trigger`, pin the data `{ "query": { "imageURL": "<A_PUBLIC_PICTURE_ADDRESS>" } }` with a real address, and press Execute workflow.
7. To use it from another workflow, call it with an Execute Workflow node or a workflow tool, and send an item that has `query.imageURL`.

## How a run goes

1. `Execute Workflow Trigger` receives the item, and `Image Test URL` copies `query.imageURL` into `imageURL`.
2. `Embed image` (HTTP Request 4.2) sends the address to Voyage's multimodal embeddings API.
3. `Qdrant variables + embedding + KNN neigbours` keeps the vector as `ImageEmbedding` and sets the cluster address, the collection name and `limitKNN`.
4. `Query Qdrant` asks the collection's points query for the nearest points to that vector, with the payloads, using the vector name `voyage`.
5. `Propagate loop variables` stores how many points came back and keeps the result. `Majority Vote` counts the `landscape_name` of those points and returns the two most common classes with their counts.
6. `Check tie` looks at the two counts. If they are equal and `limitKNN` is 100 or less, `Increase limitKNN` adds five neighbours and `Query Qdrant` runs again.
7. Otherwise `Return class` returns the most common class as `class`.

## Change the result

- Collection and first number of neighbours: `Qdrant variables + embedding + KNN neigbours`.
- How far a tie may grow: the 100 in `Check tie` and the 5 in `Increase limitKNN`.
- The class field: `landscape_name` in `Majority Vote`.
- Embedding model: `model` in `Embed image`. It has to match the model that made the collection.

## Good to know

- It always answers with a class, even for a picture unlike any class in the collection. The file has no score threshold.
- Filling the collection is not part of this file. Build it with the same steps as any batch upload: embed pictures in `document` mode, save them as a named vector `voyage` and put the class in `landscape_name`.
- A sticky note says the author measured 93.24 percent on the test part of the dataset, with no tuning. Mindket did not run that test.
- `Propagate loop variables` resets `limitKNN` to the number of points returned. On a collection of 100 points or fewer, a tie that survives every point can repeat without end.
- Voyage's docs say a picture must be a PNG, JPEG, WEBP or GIF, at most 20 MB and 16 million pixels. Its address must also answer with a content length and respect robots.txt.
- The file uses `voyage-multimodal-3`, which those docs still list as a recommended model.
- The picture's address goes to Voyage, and the vector goes to Qdrant. Nothing is written to the collection.
- The file holds no credential and no key.
```

## What is in it

3 files, 21 KB, downloaded as a zip.

```text
NOTICE.md  667 B
README.md  5 KB
workflow.json  16 KB
```

## Workflow check

Checked by Mindket on 13 Nov 2026. Read from the workflow’s file, not from a run.

- Steps: 10 steps, starting when another workflow calls it
- AI: No step calls an AI model
- Sign-ins: Signs in to: api.voyageai.com and Qdrant
- API keys: No API key is left in the file
- Step types: Mindket’s checker reads all 5 of its step types

## Get it

- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/db58f281-6556-4798-a67d-8aa848719c3a)
- [Its page on Mindket](https://mindket.com/p/db58f281-6556-4798-a67d-8aa848719c3a)
