/** * Get a rectangle with floating point boundaries using the tile width, height, bounding box, and * the bounding box section within the outer box to build the rectangle from * * @param width * @param height * @param boundingBox * @param boundingBoxSection * @return */ public static RectF getFloatRectangle( long width, long height, BoundingBox boundingBox, BoundingBox boundingBoxSection) { float left = TileBoundingBoxUtils.getXPixel(width, boundingBox, boundingBoxSection.getMinLongitude()); float right = TileBoundingBoxUtils.getXPixel(width, boundingBox, boundingBoxSection.getMaxLongitude()); float top = TileBoundingBoxUtils.getYPixel(height, boundingBox, boundingBoxSection.getMaxLatitude()); float bottom = TileBoundingBoxUtils.getYPixel(height, boundingBox, boundingBoxSection.getMinLatitude()); RectF rect = new RectF(left, top, right, bottom); return rect; }
/** * Get the latitude distance in the middle longitude * * @param boundingBox * @return */ public static double getLatitudeDistance(BoundingBox boundingBox) { return getLatitudeDistance(boundingBox.getMinLatitude(), boundingBox.getMaxLatitude()); }