I have partial map of the world (like America or Africa). and I need to know to pixel size of the world map based on the size of the partial/cropped map pixel size.
I have the size in pixel of the partial map (like 480x256
), and I have the minLongitude,maxlongitude,minlatitude,maxlatitude
(aka left,right,top,bottom edge)
I know that longitude is easy because linear :
FULL_CIRCLE_DEG = 360
longitudeDelta = (maxLongitude-minLongitude)/FULL_CIRCLE_DEG
MapFullSize = mapCroppedWidth/longitudeDelta
But for the latitude, it's kind of different:
FULL_LATITUDE_DEG = MAX_LAT_ON_EARTH - MIN_LAT_ON_EARTH
(like 85.7543...-(-85.7543...))
latitudeDelta = (maxLatitude-minLatitude)/FULL_LATITUDE_DEG
MapFullHeight = ????
Please someone can help me ?
I find lot of algorithm to get a GPScoordinateToPixel conversion but nothing on square calculation.
Thank you.