# Path: roadmaptools/printer.py
# def print_info(info, file=sys.stdout, end="\n"):
#     print("[{0}]: {1}".format(datetime.now().strftime('%H:%M:%S'), info), file=file, end=end)
# 
# Path: roadmaptools/init.py



import math
import geojson
import codecs
import sys
import argparse
import time
from roadmaptools.printer import print_info
from roadmaptools.init import config
#
# Copyright (c) 2021 Czech Technical University in Prague.
#
# This file is part of Roadmaptools 
# (see https://github.com/aicenter/roadmap-processing).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#



def compute_edge_curvatures(input_filename: str, output_filename: str):

    print_info('Computing average edge curvatures.')
    start_time = time.time()

    input_stream = open(input_filename, encoding='utf8')
    output_stream = open(output_filename, 'w')


# Path: roadmaptools/printer.py
# def print_info(info, file=sys.stdout, end="\n"):
#     print("[{0}]: {1}".format(datetime.now().strftime('%H:%M:%S'), info), file=file, end=end)
# 
# Path: roadmaptools/init.py



# Path: roadmaptools/calculate_curvature.py
import math
import geojson
import codecs
import sys
import argparse
import time
from roadmaptools.printer import print_info
from roadmaptools.init import config

#
# Copyright (c) 2021 Czech Technical University in Prague.
#
# This file is part of Roadmaptools 
# (see https://github.com/aicenter/roadmap-processing).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#



def compute_edge_curvatures(input_filename: str, output_filename: str):

    print_info('Computing average edge curvatures.')
    start_time = time.time()

    input_stream = open(input_filename, encoding='utf8')
    output_stream = open(output_filename, 'w')


    print_info("Loading geojson from: {}".format(input_filename))