Yeah, mine is tied to my sector-based UWP mapping application, so it would be a little difficult to decouple. I could send you the code this weekend, however, if it would help.
But as Mal said, if you're doing only one world, you don't need to bother. Mal's method is pretty straightforward and easy to use.
Enjoy,
Flynn