# Path: arsf_envi_reader/envi_header.py
# ENVI_TO_NUMPY_DTYPE = {'1':  numpy.uint8,
#                        '2':  numpy.int16,
#                        '3':  numpy.int32,
#                        '4':  numpy.float32,
#                        '5':  numpy.float64,
#                        '6':  numpy.complex64,
#                        '9':  numpy.complex128,
#                        '12': numpy.uint16,
#                        '13': numpy.uint32,
#                        '14': numpy.int64,
#                        '15': numpy.uint64}
# def find_hdr_file(rawfilename):
# def read_hdr_file(hdrfilename, keep_case=False):
# def write_envi_header(filename, header_dict):


import argparse
import copy
import sys
import laspy
import numpy
from osgeo import gdal
from arsf_envi_reader import envi_header
Known Issues:

Can use a lot of memory as loads three bands of an image to memory
and arrays for x,y,r,g,b from LAS file.

Author: Dan Clewley
Creation Date: 07/12/2015

"""
###########################################################
# This file has been created by ARSF Data Analysis Node and
# is licensed under the GPL v3 Licence. A copy of this
# licence is available to download with this file.
###########################################################

from __future__ import print_function


#: Debug mode - prints out more information useful for debugging.
DEBUG = False

DEFAULT_WAVELENGTHS = [640, 540, 470]

def get_bands_from_wavelengths(input_image, wavelengths=DEFAULT_WAVELENGTHS):
    """
    Get bands for a list of wavelengths (useful for creating three band
    composites).

    Function adapted from one in createimage.py
    """

# Path: arsf_envi_reader/envi_header.py
# ENVI_TO_NUMPY_DTYPE = {'1':  numpy.uint8,
#                        '2':  numpy.int16,
#                        '3':  numpy.int32,
#                        '4':  numpy.float32,
#                        '5':  numpy.float64,
#                        '6':  numpy.complex64,
#                        '9':  numpy.complex128,
#                        '12': numpy.uint16,
#                        '13': numpy.uint32,
#                        '14': numpy.int64,
#                        '15': numpy.uint64}
# def find_hdr_file(rawfilename):
# def read_hdr_file(hdrfilename, keep_case=False):
# def write_envi_header(filename, header_dict):


# Path: colour_las_file.py
import argparse
import copy
import sys
import laspy
import numpy
from osgeo import gdal
from arsf_envi_reader import envi_header

Known Issues:

Can use a lot of memory as loads three bands of an image to memory
and arrays for x,y,r,g,b from LAS file.

Author: Dan Clewley
Creation Date: 07/12/2015

"""
###########################################################
# This file has been created by ARSF Data Analysis Node and
# is licensed under the GPL v3 Licence. A copy of this
# licence is available to download with this file.
###########################################################

from __future__ import print_function


#: Debug mode - prints out more information useful for debugging.
DEBUG = False

DEFAULT_WAVELENGTHS = [640, 540, 470]

def get_bands_from_wavelengths(input_image, wavelengths=DEFAULT_WAVELENGTHS):
    """
    Get bands for a list of wavelengths (useful for creating three band
    composites).

    Function adapted from one in createimage.py
    """

    input_header = envi_header.find_hdr_file(input_image)