Python package to automatically attach the images to the geojson file
Project description
🗺️ GeoImage Organizer
A Python utility that automatically attaches images to GeoJSON features based on name matching.
It uses fuzzy string matching to intelligently link spatial features with corresponding image files.
🚀 Features
- Reads GeoJSON files
- Matches feature names with image filenames
- Uses fuzzy matching for better accuracy
- Attaches image paths to GeoJSON properties
- Supports default image fallback
- Outputs updated GeoJSON file
🧠 How It Works
- Load GeoJSON file
- Read all images from a folder
- Normalize names (lowercase, remove spaces/symbols)
- Match feature names with image filenames using fuzzy matching
- Attach best-matching image path to each feature
- Save updated GeoJSON
📁 Project Structure
project/ │ ├── geo_image_organizer.py # Main script ├── input.geojson # Input GeoJSON file ├── images/ # Image folder │ ├── kathmandu.jpg │ ├── pokhara.jpg │ └── default.jpg └── output.geojson # Output file (generated)
⚙️ Requirements
- Python 3.7+
- No external libraries required (uses built-in modules only)
📦 Standard Libraries Used
- os
- json
- difflib (get_close_matches)
▶️ How to Run
python geo_image_organizer.py
pip install setuptools wheel twine
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file geojsonfile_image_attacher-0.1.0.tar.gz.
File metadata
- Download URL: geojsonfile_image_attacher-0.1.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4473d5392de2a11d327048cabd9acb2ac115a8770d99a7c857838124eaef5b59
|
|
| MD5 |
3ba65bea69c2c38d992ca875c1fb126b
|
|
| BLAKE2b-256 |
54ce542292887315287c14a26859697bc3c2ff8e88334a00d94cc5c88d69e03c
|
File details
Details for the file geojsonfile_image_attacher-0.1.0-py3-none-any.whl.
File metadata
- Download URL: geojsonfile_image_attacher-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84376b6d8c1f938d810170884348ff9321dad44b61a7e07053c755a73bc7f5c9
|
|
| MD5 |
4e1f5edd938c3425224add2f2af17ab5
|
|
| BLAKE2b-256 |
f3ac39f185603afa33311a3148e77bb58bbe12cada0b4a18660fcc5a64cec80b
|