Coverage for geoarray/__init__.py: 92%
13 statements
« prev ^ index » next coverage.py v7.2.7, created at 2023-12-14 11:57 +0000
« prev ^ index » next coverage.py v7.2.7, created at 2023-12-14 11:57 +0000
1# -*- coding: utf-8 -*-
3# geoarray, A fast Python interface for image geodata - either on disk or in memory.
4#
5# Copyright (C) 2017-2023
6# - Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de)
7# - Helmholtz Centre Potsdam - GFZ German Research Centre for Geosciences Potsdam,
8# Germany (https://www.gfz-potsdam.de/)
9#
10# This software was developed within the context of the GeoMultiSens project funded
11# by the German Federal Ministry of Education and Research
12# (project grant code: 01 IS 14 010 A-C).
13#
14# Licensed under the Apache License, Version 2.0 (the "License");
15# you may not use this file except in compliance with the License.
16# You may obtain a copy of the License at
17#
18# http://www.apache.org/licenses/LICENSE-2.0
19#
20# Unless required by applicable law or agreed to in writing, software
21# distributed under the License is distributed on an "AS IS" BASIS,
22# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23# See the License for the specific language governing permissions and
24# limitations under the License.
26import os
27if 'MPLBACKEND' not in os.environ:
28 os.environ['MPLBACKEND'] = 'Agg'
30from .baseclasses import GeoArray # noqa: E402
31from .masks import BadDataMask # noqa: E402
32from .masks import NoDataMask # noqa: E402
33from .masks import CloudMask # noqa: E402
35from .version import __version__, __versionalias__ # noqa (E402 + F401)
38__author__ = """Daniel Scheffler"""
39__email__ = 'danschef@gfz-potsdam.de'
40__all__ = ['__version__',
41 '__versionalias__',
42 '__author__',
43 '__email__',
44 'GeoArray',
45 'BadDataMask',
46 'NoDataMask',
47 'CloudMask'
48 ]
50# $PROJ_LIB was renamed to $PROJ_DATA in proj=9.1.1, which leads to issues with fiona>=1.8.20,<1.9
51# https://github.com/conda-forge/pyproj-feedstock/issues/130
52# -> fix it by setting PROJ_DATA
53if 'GDAL_DATA' in os.environ and 'PROJ_DATA' not in os.environ and 'PROJ_LIB' not in os.environ:
54 os.environ['PROJ_DATA'] = os.path.join(os.path.dirname(os.environ['GDAL_DATA']), 'proj')