resultNP = findXYindexFromLatLon(90.0, 0, null); if (resultNP[0] != -1 && resultNP[1] != -1) includesNorthPole = true; boolean includesSouthPole = false; int[] resultSP = new int[2]; resultSP = findXYindexFromLatLon(-90.0, 0, null); if (resultSP[0] != -1 && resultSP[1] != -1) includesSouthPole = true;