Created
November 26, 2012 20:02
-
-
Save calebwoods/4150277 to your computer and use it in GitHub Desktop.
Test of acreage calculation for polygons that span more than 1 UTM zone.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Zone spanning polygon | |
{ | |
"type": "MultiPolygon", | |
"coordinates": [ | |
[ | |
[ | |
[-90.00575, 35.99485], | |
[-89.99339, 35.99485], | |
[-89.99339, 36.00481], | |
[-90.00575, 36.00481], | |
[-90.00575, 35.99485] | |
] | |
] | |
] | |
} | |
// Using Zone 15 projection | |
// => 304.64208165875334 acres | |
// Using Zone 16 projection | |
// => 304.64176688085104 acres | |
// Calculations with Polygons split so each is contained by the UTM zone. | |
// Zone 15 | |
{ | |
"type": "MultiPolygon", | |
"coordinates": [ | |
[ | |
[ | |
[-90.00575, 35.99485], | |
[-90.0, 35.99485], | |
[-90.0, 36.00481], | |
[-90.00575, 36.00481], | |
[-90.00575, 35.99485] | |
] | |
] | |
] | |
} | |
// => 141.7220884545912 acres | |
// Zone 16 | |
{ | |
"type": "MultiPolygon", | |
"coordinates": [ | |
[ | |
[ | |
[-89.999999999, 35.99485], | |
[-89.99339, 35.99485], | |
[-89.99339, 36.00481], | |
[-89.999999999, 36.00481], | |
[-89.999999999, 35.99485] | |
] | |
] | |
] | |
} | |
// => 162.9186747197805 acres | |
// Partials Combined | |
// => 304.6407631743717 acres | |
// Original Non-Split polygon Zone 15 | |
// => 304.64208165875334 acres | |
// Original Non-Split polygon Zone 16 | |
// => 304.64176688085104 acres |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment