I have a program that takes in a user input of three or more pairs of longitude and latitude. I am trying to find all the intersected/bounded quadrilateral coordinates in a table (each quadrilateral has 4 pairs of longitudes and latitudes) by the polygon constructed with the inputted coordinates.
It needs to cover the whole Earth (both poles) and be as precise as possible.
I tried converting it the spherical coordinates (using a fixed height), but then had no idea what to do next.
I am pretty sure this has been done before, but I can't find it by Googling.
I am using Java, but Python would work too.
I found a way to check whether the polygons intersect if they are Cartesian.
any help would be appreciated!