public static float getYPixel ( long height , BoundingBox boundingBox , double latitude ) { double boxHeight = boundingBox . getMaxLatitude ( ) - boundingBox . getMinLatitude ( ) ; double offset = boundingBox . getMaxLatitude ( ) - latitude ; double percentage = offset / boxHeight ; float pixel = ( float ) ( percentage * height ) ; return pixel ; }
Get the Y pixel for where the latitude fits into the bounding box