diff --git a/array_processing/tools/array_characterization.py b/array_processing/tools/array_characterization.py index e2b35b3..ae2272e 100644 --- a/array_processing/tools/array_characterization.py +++ b/array_processing/tools/array_characterization.py @@ -484,12 +484,10 @@ def read_kml(kml_file): """ # Read in KML file - k = kml.KML() - with open(kml_file, mode='rb') as f: - k.from_string(f.read()) + k = kml.KML.parse(kml_file, validate=False) # Extract coordinates - elements = list(list(list(k.features())[0].features())[0].features()) + elements = k.features[0].features[0].features lonlist = [element.geometry.x for element in elements] latlist = [element.geometry.y for element in elements] diff --git a/environment.yml b/environment.yml index 0ebe0c2..2407fe0 100644 --- a/environment.yml +++ b/environment.yml @@ -1,10 +1,9 @@ name: uafinfra channels: - conda-forge - - defaults dependencies: - - python<3.11 # Temporary fix (see https://github.com/numba/numba/issues/8304) - - fastkml<1 + - python<3.11 # This is required to avoid "setting array with sequence error" + - fastkml - ipython - obspy - numba