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.

Ghostprogrammer
  • Ghostprogrammer
  • I am known for being able to quickly decipher difficult problems to assist development teams in producing a solution. I have been called upon to be the Team Lead for multiple large-scale projects. I have a keen interest in learning new technologies, always ready for a new challenge.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: