Skip to content

vamsii777/DIGIPIN

Repository files navigation

DIGIPIN

Swift 5.8 Swift 5.8

🌍 📍 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:

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

Quick Example

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 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:

🤝 Contributing

We appreciate your contributions to make DIGIPIN better! Please read our Contributing Guidelines before submitting a pull request.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

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

About

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

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages