Simple utility to check whether a (lat, lon) point lies inside Iran.
Project description
is-in-iran
A lightweight Python library that checks whether a given geographic point
(latitude, longitude) lies inside the borders of Iran.
It loads an official MultiPolygon GeoJSON of Iran and performs a
point-in-polygon check using Shapely.
🚀 Installation
pip install is-in-iran
🎯 Usage
from is_in_iran import is_in_iran
print(is_in_iran(35.6892, 51.3890)) # → True (Tehran)
print(is_in_iran(40.4168, -3.7038)) # → False (Madrid)
• Input format: (latitude, longitude) • CRS: WGS84 (standard GPS coordinates) • Points exactly on the border also return True.
Development Setup
- Create and activate a virtual environment.
- Install the package in editable mode:
pip install -e .
Resources
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 is_in_iran-0.1.0.tar.gz.
File metadata
- Download URL: is_in_iran-0.1.0.tar.gz
- Upload date:
- Size: 29.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ca0a78ce92c5590eb331bd02b2bc5797655b99680f4619832733fd88406f2ad
|
|
| MD5 |
89f1b329cb2dcdec7305dd2f013c4c5b
|
|
| BLAKE2b-256 |
6ae6c1a7517ae6fd78dab7c9cb7f4bed7bab82e91780145436960ccbc47500ba
|
File details
Details for the file is_in_iran-0.1.0-py3-none-any.whl.
File metadata
- Download URL: is_in_iran-0.1.0-py3-none-any.whl
- Upload date:
- Size: 28.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f20a80363ea473863680b039638c5b29fd901ab5dc66f0bbf9b4e0ebd9d025d1
|
|
| MD5 |
d6a1a6ec2efe20faefc61c606b8fd07c
|
|
| BLAKE2b-256 |
c8dd9b68661d27539222493225595c18e0259cc9a2d905fd44410aafa701db6e
|