SWORD.get_data_in_AOI()

# Import package
from dahitiapi.SWORD import SWORD

# Initialize Class
sword = SWORD()

# Define AOI as shapely Polygon
points = [[16.4245605,46.1189415],[16.5783691,46.3393433],[14.3151855,46.8000594],[14.732666,45.0812786],[19.2041016,42.9001127],[22.4121094,43.5405848],[21.697998,44.8947958],[16.4245605,46.1189415]]
polygon = shapely.geometry.Polygon(points)

SWORD_version = 'v17'
response = sword.get_data_in_AOI(SWORD_version,polygon)

Output of JSON response:

{
    'SWORD_version': 'v17b',
    'centerlines': {
        '660582': {
            'cl_id': 660582,
            'node_id_0': 21309200160201,
            'node_id_1': None,
            'node_id_2': None,
            'node_id_3': None,
            'reach_id_0': 21309200161,
            'reach_id_1': None,
            'reach_id_2': None,
            'reach_id_3': None,
            'ref_location': 'POINT(17.739811849603004 43.614586778125016)',
            'x': 17.739811849603004,
            'y': 43.614586778125016
        },
        '660583': {
            'cl_id': 660583,
            'node_id_0': 21309200160201,
            'node_id_1': None,
            'node_id_2': None,
            'node_id_3': None,
            'reach_id_0': 21309200161,
            'reach_id_1': None,
            'reach_id_2': None,
            'reach_id_3': None,
            'ref_location': 'POINT(17.73989838141157 43.6148548109502)',
            'x': 17.73989838141157,
            'y': 43.6148548109502
        },
        ...
        '7768023': {
            'cl_id': 7768023,
            'node_id_0': 22780500380013,
            'node_id_1': 22780500730014,
            'node_id_2': 22780500390013,
            'node_id_3': 22780500390013,
            'reach_id_0': 22780500383,
            'reach_id_1': 22780500393,
            'reach_id_2': None,
            'reach_id_3': None,
            'ref_location': 'POINT(15.92431492940876 46.38859851186873)',
            'x': 15.92431492940876,
            'y': 46.38859851186873
        }
    },
    'nodes': {
        '21309200160201': {
            'cl_ids_0': 660580,
            'cl_ids_1': 660585,
            'dist_out': 95744.95967447573,
            'ext_dist_coef': 3.0,
            'facc double': None,
            'grod_id': 0,
            'hfalls_id': 0,
            'lakeflag': 0,
            'manual_add': 0,
            'max_width': 108.0,
            'meander_length': 2611.879831545985,
            'n_chan_max': 1,
            'n_chan_mod': 1,
            'node_id': 21309200160201,
            'node_length': 182.9337769161209,
            'obstr_type': 0,
            'reach_id': 21309200161,
            'ref_location': 'POINT(17.739879873871192 43.61472020064851)',
            'river_name': 'Neretva',
            'width': 108.0,
            'width_var': 41.0,
            'wse': 160.90000915527344,
            'wse_var': 0.0,
            'wth_coef': 0.5,
            'x': 17.7399,
            'y': 43.61472020064851
        },
        ...
        '22780700030403': {
            'cl_ids_0': 7764854,
            'cl_ids_1': 7764859,
            'dist_out': 1940064.24251305,
            'ext_dist_coef': 3.0,
            'facc double': None,
            'grod_id': 0,
            'hfalls_id': 0,
            'lakeflag': 1,
            'manual_add': 0,
            'max_width': 300.0,
            'meander_length': 2561.18812999456,
            'n_chan_max': 1,
            'n_chan_mod': 1,
            'node_id': 22780700030403,
            'node_length': 208.07526956820084,
            'obstr_type': 0,
            'reach_id': 22780700033,
            'ref_location': 'POINT(14.377112986998215 46.55161399581212)',
            'river_name': 'Drau',
            'width': 300.0,
            'width_var': 73.25,
            'wse': 402.3000183105469,
            'wse_var': 0.0,
            'wth_coef': 0.5,
            'x': 14.3771,
            'y': 46.55161399581212
        }
    },
    'reaches': {
        '21309200161': {
            'continent': 'europe',
            'dist_out': 109340.2867116863,
            'facc': 2310.1770332731303,
            'grod_id': 0,
            'hfalls_id': 0,
            'iceflag': 690,
            'lakeflag': 0,
            'max_width': 690.0,
            'n_chan_max': 1,
            'n_chan_mod': 1,
            'n_nodes': 88,
            'n_rch_down': 1,
            'n_rch_up': 1,
            'nodes': 'LINESTRING(17.7196 '
                '43.58914034786054,17.7198 '
                '43.59088916941436,17.721 '
                '43.59229416658045,17.7228 '
                '43.593478945007384,17.7246 '
                ...,
                '43.68420983976339,17.727 '
                '43.68566216502656,17.7288 '
                '43.68710470121508,17.7303 '
                '43.68839094885663,17.7322 '
                '43.6898565550107)',
            'obstr_type': 0.0,
            'rch_id_dn_0': 21309200154,
            'rch_id_dn_1': None,
            'rch_id_dn_2': None,
            'rch_id_dn_3': None,
            'rch_id_up_0': 21309200174,
            'rch_id_up_1': None,
            'rch_id_up_2': None,
            'rch_id_up_3': None,
            'reach_id': 21309200161,
            'reach_length': 17545.172356315863,
            'river_name': 'Neretva',
            'slope': 2.3792923081114785,
            'swot_obs': 2,
            'swot_orbits_0': 195,
            'swot_orbits_1': 430,
            'swot_orbits_10': None,
            'swot_orbits_11': None,
            'swot_orbits_12': None,
            'swot_orbits_13': None,
            'swot_orbits_14': None,
            'swot_orbits_15': None,
            'swot_orbits_16': None,
            'swot_orbits_17': None,
            'swot_orbits_18': None,
            'swot_orbits_19': None,
            'swot_orbits_2': None,
            'swot_orbits_20': None,
            'swot_orbits_3': None,
            'swot_orbits_4': None,
            'swot_orbits_5': None,
            'swot_orbits_6': None,
            'swot_orbits_7': None,
            'swot_orbits_8': None,
            'swot_orbits_9': None,
            'width': 75.0,
            'width_var': 2028.556906093569,
            'wse': 161.6999969482422,
            'wse_var': 215.4210873007904,
            'x': 17.75034647001848,
            'x_max': 17.770835054774714,
            'x_min': 17.719370746181717,
            'y': 43.64617170746729,
            'y_max': 43.690667770963046,
            'y_min': 43.58833442248012
            },
            ...
            '22780700033': {'continent': 'europe',
            'dist_out': 1943505.6609273285,
            'facc': 9072.412025246818,
            'grod_id': 0,
            'hfalls_id': 0,
            'iceflag': 480,
            'lakeflag': 1,
            'max_width': 480.0,
            'n_chan_max': 1,
            'n_chan_mod': 1,
            'n_nodes': 57,
            'n_rch_down': 1,
            'n_rch_up': 1,
            'nodes': 'LINESTRING(14.4757 '
                '46.560027661066364,14.4731 '
                '46.56045049790618,14.4706 '
                '46.56085013876577,14.468 '
                '46.561545404909516,14.4655 '
                ...,
                '46.54511642643588,14.3424 '
                '46.54510183388277,14.3398 '
                '46.54509489666818,14.3373 '
                '46.54531544744251,14.3345 '
                '46.545650500987676)',
            'obstr_type': 0.0,
            'rch_id_dn_0': 22780700024,
            'rch_id_dn_1': None,
            'rch_id_dn_2': None,
            'rch_id_dn_3': None,
            'rch_id_up_0': 22780700041,
            'rch_id_up_1': None,
            'rch_id_up_2': None,
            'rch_id_up_3': None,
            'reach_id': 22780700033,
            'reach_length': 11442.87369511327,
            'river_name': 'Drau',
            'slope': 0.7953248959892831,
            'swot_obs': 3,
            'swot_orbits_0': 251,
            'swot_orbits_1': 458,
            'swot_orbits_10': None,
            'swot_orbits_11': None,
            'swot_orbits_12': None,
            'swot_orbits_13': None,
            'swot_orbits_14': None,
            'swot_orbits_15': None,
            'swot_orbits_16': None,
            'swot_orbits_17': None,
            'swot_orbits_18': None,
            'swot_orbits_19': None,
            'swot_orbits_2': 529,
            'swot_orbits_20': None,
            'swot_orbits_3': None,
            'swot_orbits_4': None,
            'swot_orbits_5': None,
            'swot_orbits_6': None,
            'swot_orbits_7': None,
            'swot_orbits_8': None,
            'swot_orbits_9': None,
            'width': 263.0,
            'width_var': 10362.23770528119,
            'wse': 402.25,
            'wse_var': 8.703041342015238,
            'x': 14.404873669923443,
            'x_max': 14.476629263966212,
            'x_min': 14.333158647949444,
            'y': 46.55424633185432,
            'y_max': 46.562200417943366,
            'y_min': 46.54508266700623
        }
    }
}