I need help creating a Java code library.
I need Java code which will take 3 parameters (double latitude, double longitude, String highwayName) to check if the given lat/lng point is East, West, North, or South of the given Highway, and will return one of 5 values: isWest, isEast, isNorth, isSouth, or NULL. Input coordinates will be in standard GPS format, also known as WGS-84 (please Google it, do not ask me what is WGS-84). The scope of this project is only San Diego County and only the following highways: I-5, I-15, I-8, I-805, SR-56, SR-52, SR-67, SR-78, and SR-163.
Solution must be compliant with Java 8 and Maven 3.x. All code submitted must be fully tested by the freelancer with multiple testcases showing both positions (east/west or north/south) for each road. Evidence of testing must be submitted in the form of logs, screnshots, etc. Untested code will not be accepted.
Below is some Help and Suggested Algorithm. This is the only help you will receive from the employer:
The data files from SanGIS are attached. You may use the free tool ArcGIS Explorer Desktop to view the files (open [url removed, login to view] first). You can use geotools ([url removed, login to view]) to process the attached files in Java. If you don't like the attached files, you may choose to use Open Street Maps Planet OSM instead or free Google Map APIs (choose this at your own risk).
Algorithm: First you identify the relevant line segment (the segment which spans the same latitude in a north-south highway, or the same longitude in an east-west highway), then use the straight-line formula to see if the point of interest is right or left, above or below the identified segment. All the highways that have an odd number are considered North–South, so they will only be queried for isEast or isWest to the point of interest. The even-numbered highways are considered East–West, so only isNorth or isSouth are valid queries. For example, I-5 is a North–South Highway. Regardless of the complexity of the road's shape, only the number even or odd determines its effective orientation. If the point's projection falls outside of any segment (i.e. after the end of the road), the result should be null (i.e. neither true or false).
8 freelancers are bidding on average $114 for this job
GIS Developer here. Worked on ArcGIS and WebGIS. Contact me I am interested. Relevant Skills and Experience 4+ years of professional experience. Proposed Milestones $300 USD - .