Guest User

Untitled

a guest
May 26th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. >>> from agoodle import AGoodle
  2. >>> g = AGoodle('agoodle/tests/data/z.tif')
  3.  
  4. # you'll more likely get wkt from an openlayers query or shapely.
  5. >>> wkt = """POLYGON ((-13249847.8545559067279100 4564878.5321548320353031, -13236254.9522339217364788 4581493.7669484084472060, -13222662.0499119367450476 4598109.0017419848591089, -13209069.1475899536162615 4515032.8277741018682718, -13195476.2452679686248302 4531648.0625676782801747, -13181883.3429459836333990 4548263.2973612546920776, -13249847.8545559067279100 4564878.5321548320353031))"""
  6.  
  7. >>> summary = g.summarize_wkt(wkt)
  8.  
  9. >>> import pprint
  10. >>> pprint.pprint(summary)
  11. {11: 2006769.8807835164,
  12. 21: 4002006.6013326449,
  13. 22: 846245.6321982214,
  14. 23: 25949.610527373057,
  15. 31: 6582551.2037769658,
  16. 41: 5512850.5920374766,
  17. 42: 344535862.26199067,
  18. 43: 1069700.6117394895,
  19. 52: 967202533.44642437,
  20. 71: 19593397.593195956,
  21. 81: 707847.70938556513,
  22. 82: 126864.76257826829,
  23. 90: 2145167.8035961729,
  24. 95: 44690.995908253601}
Add Comment
Please, Sign In to add comment