Skip to main content

Osmmap Loader

pip install llama-index-readers-maps

The Osmmap Loader will fetch map data from the Overpass api for a certain place or area. Version Overpass API 0.7.60 is used by this loader.

The api will provide you with all the nodes, relations, and ways for the particular region when you request data for a region or location.

Functions of the loader

  • To start, it first filters out those nodes that are already tagged, leaving just those nodes that are within 2 kilometres of the target location. The following keys are removed during filtering:["nodes," "geometry," "members"] from each node. The response we received is based on the tags and values we provided, so be sure to do that. The actions are covered below.

Steps to find the suitable tag and values

  1. Visit Taginfo. In essence, this website has all conceivable tags and values.
  2. Perform a search for the feature you're looking for, for instance, "hospital" will return three results: "hospital" as an amenity, "hospital" as a structure, and "hospital" as a healthcare facility.
  3. We may infer from the outcome that tag=amenity and value=hospital.
  4. Leave the values parameter to their default value if you do not need to filter.

Usage

The use case is here.

Let's meet Jayasree, who is extracting map features from her neighbourhood using the OSM map loader. She requires all the nodes, routes, and relations within a five-kilometer radius of her locale (Guduvanchery).

  • She must use the following arguments in order to accomplish the aforementioned. Localarea = "Guduvanchery" (the location she wants to seek), local_area_buffer = 5000 (5 km).

And the code snippet looks like

from llama_index.readers.maps import OpenMap

loader = MapReader()
documents = loader.load_data(
    localarea="Guduvanchery",
    search_tag="",
    tag_only=True,
    local_area_buffer=5000,
    tag_values=[""],
)

Now she wants only the list hospitals around the location

  • so she search for hospital tag in the Taginfo and she got
from llama_index.readers.maps import OpenMap

loader = MapReader()
documents = loader.load_data(
    localarea="Guduvanchery",
    search_tag="amenity",
    tag_only=True,
    local_area_buffer=5000,
    tag_values=["hospital", "clinic"],
)

This loader is designed to be used as a way to load data into LlamaIndex.

Metadata

Release files for llama-index-readers-maps 0.6.0

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

Source distribution (sdist)

Source distribution for llama-index-readers-maps 0.6.0
File Size Uploaded Provenance Actions
llama_index_readers_maps-0.6.0.tar.gz 5.6 kB Without provenance Details for llama_index_readers_maps-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-readers-maps 0.6.0
File Interpreter ABI Platform Actions
llama_index_readers_maps-0.6.0-py3-none-any.whl Python 3 none any Details for llama_index_readers_maps-0.6.0-py3-none-any.whl

Total release size: 10.7 kB

Release files / llama_index_readers_maps-0.6.0.tar.gz

Download URL llama_index_readers_maps-0.6.0.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
fa33498782b48d1b79d2fa6cc4f4f9cf47705cc279066e367ab0f845490c300e
BLAKE2b-256 checksum
How to use checksums
8d410f6d51405bee3513b86c0cad6731c9728969ecfec9c35bf8c6743b4b75da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / llama_index_readers_maps-0.6.0-py3-none-any.whl

Download URL llama_index_readers_maps-0.6.0-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
582011a19fe271ce858cb3c2688f0e0cb111be08d6ab2bc2c0af76adcc918901
BLAKE2b-256 checksum
How to use checksums
7795da1adf36a03926dec02cbba4eef1b4c2ba84872dd2aacf2c58877ca8551f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for llama-index-readers-maps 0.6.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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