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)
- Host: GitHub
- URL: https://github.com/vamsii777/digipin
- Owner: vamsii777
- License: mit
- Created: 2025-02-16T20:32:17.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-01T19:39:20.000Z (about 1 year ago)
- Last Synced: 2025-07-01T20:31:45.782Z (about 1 year ago)
- Topics: digipin, library, swift
- Language: Swift
- Homepage: https://swiftpackageindex.com/vamsii777/DIGIPIN/main/documentation/digipin
- Size: 143 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
π π 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