Completed
Push — master ( 35f6e6...1a96f6 )
by Bart
01:20
created

create_merged_contour()   A

Complexity

Conditions 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
dl 0
loc 10
rs 9.4285
1
#!/usr/bin/env python3
2
3
import sys
4
import os
5
6
import numpy
7
8
sys.path.append('../nsmaps')
9
10
import nsmaps
11
from nsmaps.logger import logger
12
13
14
DATA_DIR = './data/'
15
16
17
def create_merged_contour():
18
    min_level = 55
19
    max_level = 180
20
    n_levels = 37
21
    # n_levels = 100
22
    levels_minor = numpy.linspace(min_level, max_level, num=n_levels)
23
    config = nsmaps.contourmap.ContourPlotConfig()
24
    contourmap = nsmaps.contourmap.ContourMerged(config)
25
    contourmap.merge_grid_data(DATA_DIR)
26
    contourmap.create_geojson('combined.geojson', stroke_width=4, levels=levels_minor)
27
28
29
if __name__ == "__main__":
30
    create_merged_contour()