Skip to main content

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

  1. Create and activate a virtual environment.
  2. Install the package in editable mode:
pip install -e .

Resources

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

is_in_iran-0.1.0.tar.gz (29.3 kB view details)

Uploaded Source

Built Distribution

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

is_in_iran-0.1.0-py3-none-any.whl (28.4 kB view details)

Uploaded Python 3

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

Hashes for is_in_iran-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1ca0a78ce92c5590eb331bd02b2bc5797655b99680f4619832733fd88406f2ad
MD5 89f1b329cb2dcdec7305dd2f013c4c5b
BLAKE2b-256 6ae6c1a7517ae6fd78dab7c9cb7f4bed7bab82e91780145436960ccbc47500ba

See more details on using hashes here.

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

Hashes for is_in_iran-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f20a80363ea473863680b039638c5b29fd901ab5dc66f0bbf9b4e0ebd9d025d1
MD5 d6a1a6ec2efe20faefc61c606b8fd07c
BLAKE2b-256 c8dd9b68661d27539222493225595c18e0259cc9a2d905fd44410aafa701db6e

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