public static float getXPixel ( long width , BoundingBox boundingBox , double longitude ) { double boxWidth = boundingBox . getMaxLongitude ( ) - boundingBox . getMinLongitude ( ) ; double offset = longitude - boundingBox . getMinLongitude ( ) ; double percentage = offset / boxWidth ; float pixel = ( float ) ( percentage * width ) ; return pixel ; }
Get the X pixel for where the longitude fits into the bounding box