Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4a8bc76

Browse files
committed
+ sample images
1 parent a2da838 commit 4a8bc76

File tree

3 files changed

+40
-16
lines changed

3 files changed

+40
-16
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*.pyc
55
*.swp
66
*.swo
7+
*.png
78
tags
89
MANIFEST
910
dist/

sample_images.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# -*- coding: utf-8 -*-
2+
3+
import logging as mod_logging
4+
import Image as mod_image
5+
import ImageDraw as mod_imagedraw
6+
7+
import srtm as mod_srtm
8+
9+
"""
10+
mod_logging.basicConfig(level=mod_logging.DEBUG,
11+
format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s')
12+
"""
13+
14+
geo_elevation_data = mod_srtm.get_data()
15+
16+
image = geo_elevation_data.get_image((400, 400), (45, 46), (13, 14), 300)
17+
image.save('istra.png')
18+
19+
miami = (25.787676, -80.224145)
20+
image = geo_elevation_data.get_image((400, 400),
21+
(miami[0] - 1, miami[0] + 1.5),
22+
(miami[1] - 2, miami[1] + 0.5),
23+
40)
24+
image.save('miami.png')
25+
26+
rio_de_janeiro = (-22.908333, -43.196389)
27+
image = geo_elevation_data.get_image((400, 400),
28+
(rio_de_janeiro[0] - 0.5, rio_de_janeiro[0] + 2),
29+
(rio_de_janeiro[1] - 0.5, rio_de_janeiro[1] + 2),
30+
1000)
31+
image.save('rio.png')
32+
33+
sidney = (-33.859972, 151.211111)
34+
image = geo_elevation_data.get_image((400, 400),
35+
(sidney[0] - 1.5, sidney[0] + 1),
36+
(sidney[1] - 1.5, sidney[1] + 1),
37+
1000)
38+
image.save('sidney.png')
39+

test_srtm_file_to_image.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)