Last active
          August 29, 2015 14:00 
        
      - 
      
- 
        Save geobabbler/11366761 to your computer and use it in GitHub Desktop. 
    Function to generate world file parameters for any TMS tile. Useful for building virtual rasters. Add to globalmaptiles.py
  
        
  
    
      This file contains hidden or 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
    
  
  
    
  | def WorldFileParameters(self, tx, ty, zoom): | |
| "Returns world file (affine transofrmation) parameters of the given tile." | |
| bounds = self.TileBounds( tx, ty, zoom) | |
| moriginx = bounds[3] + (self.Resolution(zoom) / 2) | |
| moriginy = bounds[0] - (self.Resolution(zoom) / 2) | |
| return (self.Resolution(zoom), 0.0, 0.0, self.Resolution(zoom) * -1, moriginy, moriginx) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment