selden wrote:If you haven't already, you should join the Cartographer's Guild forum at
http://www.cartographersguild.com/A search of that forum came up with a method for measuring the area of an arbitrary shape on a map by painting the area white, increasing contrast until everything else is black, and then getting a count of the white pixels. Some adjustments to the technique would be needed if the area is large compared to the size of the 2D map projection that you're using. (e.g. use MMPS to center the area you're interested in.)
See the thread at
http://www.cartographersguild.com/archi ... -9246.html
You may find this calculator useful if you decide to use an approach similar to that suggested by Selden:
http://www.1728.org/sphere.htm(I'm assuming that you want to derive the areas from the textures themselves.)
Assuming that you can count the appropriate pixels in a given horizontal line of a texture, and assuming your planets are close to spherical, then this calculator can be used to come up with a correction factor to be applied to account for the stretching effect as you get closer to the poles, allowing approximate areas to be calculated based on pixel count.
Near the bottom set the significant digits. 10 should be accurate enough.
Choose the second option "Sphere Radius 'r' & Cap Height 'h'", and then enter the planet's radius in the first box "Sphere Radius", and the texture line's distance from the pole in the "Cap Height 'h'" field.
Press CALCULATE.
You can then use the value from the "Spherical Cap Radius" field as a correction to your pixel count for that line of pixels.
Repeat for each vertical line of the texture.
I recommend entering 1 for the radius, and a fraction of that for "Cap Height 'h'", so that the calculated value can be simply multiplied by your pixel count.
If your texture is 2048 x 1024, then you'll have 1024 pixel counts representing the land area at each latitude, and 512 correction factors.
eg.
1. for the line of pixels nearest the equator with a land-surface pixel count of lets say 756 (out of 2048), we'd calculate the "Cap Height 'h'" as 511.5/512 = 0.9990234375.
So, enter 1 in "radius" and 0.9990234375 in "Cap Height 'h'", press CALCULATE to get the correction factor, which in this case is 0.9999995232.
2. For a line of pixels at 45deg lattitude with the same number of land pixels, you would enter 1 in "radius", and 255.5/512 = 0.4990234375 in the "Cap Height 'h'" field, which would give a correction factor of 0.86546. So multiplying 756 x 0.8654608505 = 654.288402978, which is the corrected area (in terms of equatorial pixels) for that latitude.
3. For the bottom or top lines (closest to the pole): enter 1, and 0.5/512 = 0.0009765625, giving a correction factor of 0.04418338291, and a corrected pixel count of 756 x 0.04418338291 = 33.40263747996 (equatorial pixels).
ie. in this example 756 texture pixels near the pole has the same actual area as 33.4 pixels at the equator.
That's just 3 examples (all assuming the same pixel count). You'll need to do this once for each line of the texture (and your raw pixel counts will differ at each "latitude"), however if you calculate all the correction factors first, and put these in a spreadsheet, you'll just need to plug in each of your pixel counts and get the spreadsheet to calculate the actual areas based on the radius of the planet ( using the corrected pixel counts of course).
CC