Skip to main content

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

  1. Load GeoJSON file
  2. Read all images from a folder
  3. Normalize names (lowercase, remove spaces/symbols)
  4. Match feature names with image filenames using fuzzy matching
  5. Attach best-matching image path to each feature
  6. 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


Download files

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

Source Distribution

geojsonfile_image_attacher-0.1.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geojsonfile_image_attacher-0.1.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file geojsonfile_image_attacher-0.1.0.tar.gz.

File metadata

File hashes

Hashes for geojsonfile_image_attacher-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4473d5392de2a11d327048cabd9acb2ac115a8770d99a7c857838124eaef5b59
MD5 3ba65bea69c2c38d992ca875c1fb126b
BLAKE2b-256 54ce542292887315287c14a26859697bc3c2ff8e88334a00d94cc5c88d69e03c

See more details on using hashes here.

File details

Details for the file geojsonfile_image_attacher-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for geojsonfile_image_attacher-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 84376b6d8c1f938d810170884348ff9321dad44b61a7e07053c755a73bc7f5c9
MD5 4e1f5edd938c3425224add2f2af17ab5
BLAKE2b-256 f3ac39f185603afa33311a3148e77bb58bbe12cada0b4a18660fcc5a64cec80b

See more details on using hashes here.

Supported by

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