Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>> from agoodle import AGoodle
- >>> g = AGoodle('agoodle/tests/data/z.tif')
- # you'll more likely get wkt from an openlayers query or shapely.
- >>> 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))"""
- >>> summary = g.summarize_wkt(wkt)
- >>> import pprint
- >>> pprint.pprint(summary)
- {11: 2006769.8807835164,
- 21: 4002006.6013326449,
- 22: 846245.6321982214,
- 23: 25949.610527373057,
- 31: 6582551.2037769658,
- 41: 5512850.5920374766,
- 42: 344535862.26199067,
- 43: 1069700.6117394895,
- 52: 967202533.44642437,
- 71: 19593397.593195956,
- 81: 707847.70938556513,
- 82: 126864.76257826829,
- 90: 2145167.8035961729,
- 95: 44690.995908253601}
Add Comment
Please, Sign In to add comment