An open API service indexing awesome lists of open source software.

https://github.com/vamsii777/digipin

A Swift library for handling India Post's DIGIPIN (Digital Postal Index Number)
https://github.com/vamsii777/digipin

digipin library swift

Last synced: 12 months ago
JSON representation

A Swift library for handling India Post's DIGIPIN (Digital Postal Index Number)

Awesome Lists containing this project

README

          


DIGIPIN



Swift 5.8


Swift 5.8




Documentation


MIT License


Continuous Integration



🌍 πŸ“ A Swift library for handling India Post's DIGIPIN (Digital Postal Index Number) system - encode any location in India into a simple 10-character code.

## πŸ—ΊοΈ Geographic Encoding

The `DIGIPIN` framework provides tools to generate and decode DIGIPIN codes - India Post's revolutionary geographic encoding system. It enables precise location representation through a simple 10-character alphanumeric code, covering all of India's territory with high precision.

Add the `DIGIPIN` product to your target's dependencies:

```swift
.target(
name: "YourTarget",
dependencies: [
.product(name: "DIGIPIN", package: "digipin")
]
)
```

### Quick Example

```swift
import DIGIPIN

// Generate a DIGIPIN code
let digipin = DIGIPIN()
let coordinate = Coordinate(latitude: 28.622788, longitude: 77.213033) // Dak Bhawan (official example)

let code = try digipin.generateDIGIPIN(for: coordinate)
print(code) // "39J-49L-L8T4"

// Convert back to coordinates
let location = try digipin.coordinate(from: "39J-49L-L8T4")
print("Lat: \(location.latitude), Long: \(location.longitude)")
```

See the framework's [documentation](https://swiftpackageindex.com/vamsii777/DIGIPIN/documentation) for detailed information and guides.

## πŸ“ Geographic Coverage

The system covers India's entire territory:
- Latitude: 2.5Β°N to 38.5Β°N
- Longitude: 63.5Β°E to 99.5Β°E

Including:
- Mainland India
- Andaman and Nicobar Islands
- Lakshadweep Islands
- Buffer zones

For technical details about the DIGIPIN system, see:
- [Official DIGIPIN Technical Documentation](https://www.indiapost.gov.in/VAS/DOP_PDFFiles/DIGIPIN%20Technical%20document.pdf)

## 🀝 Contributing

We appreciate your contributions to make DIGIPIN better! Please read our [Contributing Guidelines](CONTRIBUTING.md) before submitting a pull request.

## πŸ“„ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Acknowledgments

- India Post for developing the DIGIPIN system
- The Swift community