Geo – Latitude & Longitude
A few years back, I was working for a customer that was going to begin project that would involve GPS, and Geo-Fencing of items they were tracking. In preparation of this work, I put together some classes that would assist working with the Geo-Fence.
The first class here, is a simple Coordinate class that would be the base of doing Longitude and Latitude:
Takes a Degree amount, and stores it. Notice this is an abstract class, you need to implement the getDegreeLimit() for derived classes. Longitude allows up to 180 degrees, and Latitude allows up to 90 degrees.
Can see that we call setDecimal() in the constructor in to set the value of the degree. We have the getDegreeLimit() implemented limiting us to 180 for the degree range.
Next time we will be discussing the GeoLocation.