# -*- coding: ISO-8859-15 -*-
# =============================================================================
# Copyright (c) 2004, 2006 Sean C. Gillies
# Copyright (c) 2007 STFC <http://www.stfc.ac.uk>
#
# Authors :
#          Oliver Clements <olcl@pml.ac.uk>
#
# Contact email: olcl@pml.ac.uk
# =============================================================================

# !!! NOTE: Does not conform to new interfaces yet #################


from owslib.coverage.wcsBase import WCSBase, WCSCapabilitiesReader, ServiceException
from owslib.ows import (
    OwsCommon,
    ServiceIdentification,
    ServiceProvider,
    OperationsMetadata,
)

from urllib.parse import urlencode
from owslib.util import openURL, testXMLValue
from owslib.etree import etree
from owslib.crs import Crs
import os
import errno
import dateutil.parser as parser
from datetime import timedelta
import logging
from owslib.util import log, datetime_from_ansi, datetime_from_iso, param_list_to_url_string


#  function to save writing out WCS namespace in full each time
def ns(tag):
    return "{http://www.opengis.net/ows/2.0}" + tag


def nsWCS2(tag):
    return "{http://www.opengis.net/wcs/2.0}" + tag


class WebCoverageService_2_0_1(WCSBase):
    """Abstraction for OGC Web Coverage Service (WCS), version 2.0.1