Last active
August 29, 2015 14:01
-
-
Save wildintellect/474400f316bb93ebecb1 to your computer and use it in GitHub Desktop.
Convert BBOX+Image to World File
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
#how to make world file from a bounding box and an image file - aka kml/kmz | |
#Generic Formula | |
(W-E)/(width pixels) | |
0 | |
0 | |
(N-S)/(width pixels) | |
West+.5*abs((W-E)/(width pixels)) | |
North-.5*abs((N-S)/(height pixels)) | |
#Example | |
((abs(80.2495816317472))-(abs(-74.697157981179)))/600 | |
0 | |
0 | |
-((abs(41.515232294256))-(abs(36.425510614568)))/550 | |
-80.2495816317472 (+1/2 pixel) | |
41.515232294256 (-1/2 pixel) | |
#Results | |
0.009254039 | |
0 | |
0 | |
-0.009254039 | |
-80.240327593 | |
41.505978255 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment