Metadata-Version: 2.2
Name: indiagrid
Version: 0.4.1
Summary: A library for WGS84 to Indian Grid System conversion.
Home-page: https://github.com/goki75/indiagrid
Author: G Kiran
Author-email: G Kiran <goki75@gmail.com>
License: GNU Lesser General Public License v2.1
Project-URL: homepage, https://github.com/goki75/indiagrid
Project-URL: repository, https://github.com/goki75/indiagrid
Keywords: location,geography,encoding,decoding,latitude,longitude
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.1
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: home-page
Dynamic: requires-python

# Indian Grid Converter

A Python library for converting WGS84 latitude and longitude coordinates to the Indian Grid System and vice versa.

## Features

- Convert WGS84 latitude and longitude to the Indian Grid System.
- Convert Indian Grid System coordinates back to WGS84 latitude and longitude.
- Accurate calculations based on the Indian grid system parameters.

## Installation

You can install the package using either of the following methods:

### Using pip:

```bash
pip install indiagrid
```

### Installing from GitHub:

```bash
pip install git+https://github.com/goki75/indiagrid.git
```

## Usage

### Converting WGS84 to Indian Grid System

```python
from indiagrid import wgs84_to_igs

result = wgs84_to_igs(lat=28.7041, lon=77.1025)
print(result)
```

**Output**:

```python
{'Easting': 3632281.67, 'Northing': 531791.54, 'Grid': 'I'}
```

### Converting Indian Grid System to WGS84

```python
from indiagrid import igs_to_wgs84

reverse_result = igs_to_wgs84(3632281.67, Nth=531791.54, grid="I")
print(reverse_result)
```

**Output**:

```python
{'latitude': 28.704099993002522, 'longitude': 77.10249995658076}
```

## Parameters

### `wgs84_to_igs`

- **lat** (float): Latitude in decimal degrees.
- **lon** (float): Longitude in decimal degrees.
- **esterr** (float, optional): Easting error adjustment. Default is 0.
- **ntherr** (float, optional): Northing error adjustment. Default is 0.

### `igs_to_wgs84`

- **Eth** (float): Easting in the Indian grid system.
- **Nth** (float): Northing in the Indian grid system.
- **grid** (str): Grid region (e.g., 'I', 'IIA', etc.).
- **esterr** (float, optional): Easting error adjustment. Default is 0.
- **ntherr** (float, optional): Northing error adjustment. Default is 0.

## License

This project is licensed under the **GPLv2 License**.
