Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if coords is not None:
return cls(MultiPolygon=MultiPolygonType(coordinates=coords))
return cls()
class AnnotationType(Serializable):
"""
The annotation type.
"""
_fields = ('Identifier', 'SpatialReferenceSystem', 'Objects')
_required = ('Identifier', 'Objects')
_collections_tags = {'Objects': {'array': False, 'child_tag': 'Object'}}
# Descriptor
Identifier = _StringDescriptor(
'Identifier', _required, strict=DEFAULT_STRICT,
docstring='') # type: str
SpatialReferenceSystem = _SerializableDescriptor(
'SpatialReferenceSystem', ReferenceSystemType, _required, strict=DEFAULT_STRICT,
docstring='') # type: Union[None, ReferenceSystemType]
Objects = _SerializableListDescriptor(
'Objects', AnnotationObjectType, _collections_tags, _required, strict=DEFAULT_STRICT,
docstring='') # type: List[AnnotationObjectType]
def __init__(self, Identifier=None, SpatialReferenceSystem=None, Objects=None, **kwargs):
"""
Parameters
----------
Identifier : str
SpatialReferenceSystem : None|ReferenceSystemType
'DESVersion', _required, strict=DEFAULT_STRICT, default_value=13,
docstring='The version number of the DES. Should there be multiple specified in an instance document '
'the one at the root node is the one that will apply to the entire document.') # type: int
createDate = _StringDescriptor(
'createDate', _required, strict=DEFAULT_STRICT,
docstring='This should be a date of format :code:`YYYY-MM-DD`, but this is not checked.') # type: str
compliesWith = _StringDescriptor(
'compliesWith', _required, strict=DEFAULT_STRICT,
docstring='') # type: Union[None, str]
classification = _StringEnumDescriptor(
'classification', ('U', 'C', 'R', 'S', 'TS'), _required, strict=DEFAULT_STRICT,
docstring='') # type: str
ownerProducer = _StringDescriptor(
'ownerProducer', _required, strict=DEFAULT_STRICT, # default_value='USA',
docstring='') # type: str
SCIcontrols = _StringDescriptor(
'SCIcontrols', _required, strict=DEFAULT_STRICT,
docstring='') # type: Union[None, str]
SARIdentifier = _StringDescriptor(
'SARIdentifier', _required, strict=DEFAULT_STRICT,
docstring='') # type: Union[None, str]
disseminationControls = _StringDescriptor(
'disseminationControls', _required, strict=DEFAULT_STRICT,
docstring='') # type: Union[None, str]
FGIsourceOpen = _StringDescriptor(
'FGIsourceOpen', _required, strict=DEFAULT_STRICT,
docstring='') # type: Union[None, str]
FGIsourceProtected = _StringDescriptor(
'FGIsourceProtected', _required, strict=DEFAULT_STRICT,
docstring='') # type: Union[None, str]
releasableTo = _StringDescriptor(
'releasableTo', _required, strict=DEFAULT_STRICT,
Parameters that identify 2-D sampled Gain & Phase patterns at single
frequency value.
"""
_fields = ('Freq', 'ArrayId')
_required = ('Freq', 'ArrayId')
# descriptors
Freq = _FloatDescriptor(
'Freq', _required, strict=DEFAULT_STRICT, bounds=(0, None),
docstring='Frequency value for which the sampled Array and Element '
'pattern(s) are provided, in Hz.') # type: float
ArrayId = _StringDescriptor(
'ArrayId', _required, strict=DEFAULT_STRICT,
docstring='Support array identifier of the sampled gain/phase of the array '
'at ref Frequency.') # type: str
ElementId = _StringDescriptor(
'ElementId', _required, strict=DEFAULT_STRICT,
docstring='Support array identifier of the sampled gain/phase of the element '
'at ref frequency.') # type: str
def __init__(self, Freq=None, ArrayId=None, ElementId=None, **kwargs):
"""
Parameters
----------
Freq : float
ArrayId : str
ElementId : None|str
kwargs
"""
if '_xml_ns' in kwargs:
"""
"""
_fields = ('Csname', 'Datum', 'PrimeMeridian', 'AngularUnit', 'LinearUnit')
_required = ('Csname', 'Datum', 'PrimeMeridian', 'AngularUnit')
# Descriptor
Csname = _StringDescriptor(
'Csname', _required, strict=DEFAULT_STRICT,
docstring='') # type: str
Datum = _SerializableDescriptor(
'Datum', DatumType, _required, strict=DEFAULT_STRICT,
docstring='') # type: DatumType
PrimeMeridian = _SerializableDescriptor(
'PrimeMeridian', PrimeMeridianType, _required, strict=DEFAULT_STRICT,
docstring='') # type: PrimeMeridianType
AngularUnit = _StringDescriptor(
'AngularUnit', _required, strict=DEFAULT_STRICT,
docstring='') # type: str
LinearUnit = _StringDescriptor(
'LinearUnit', _required, strict=DEFAULT_STRICT,
docstring='') # type: str
def __init__(self, Csname=None, Datum=None, PrimeMeridian=None, AngularUnit=None, LinearUnit=None, **kwargs):
"""
Parameters
----------
Csname : str
Datum : DatumType
PrimeMeridian : PrimeMeridianType
AngularUnit : str
LinearUnit : str
self._xml_ns_key = kwargs['_xml_ns_key']
self.CODId = CODId
self.DwellId = DwellId
super(DwellTimesType, self).__init__(**kwargs)
class AntennaType(Serializable):
""""
Antenna Phase Center and Antenna Pattern identifiers for
the antenna(s) used to collect and form the signal array data.
"""
_fields = ('TxAPCId', 'TxAPATId', 'RcvAPCId', 'RcvAPATId')
_required = _fields
# descriptors
TxAPCId = _StringDescriptor(
'TxAPCId', _required, strict=DEFAULT_STRICT,
docstring='Identifier of Transmit APC to be used to compute the transmit '
'antenna pattern as a function of time for the channel.') # type: str
TxAPATId = _StringDescriptor(
'TxAPATId', _required, strict=DEFAULT_STRICT,
docstring='Identifier of Transmit Antenna pattern used to form the channel '
'signal array.') # type: str
RcvAPCId = _StringDescriptor(
'RcvAPCId', _required, strict=DEFAULT_STRICT,
docstring='Identifier of Receive APC to be used to compute the receive antenna '
'pattern as a function of time for the channel.') # type: str
RcvAPATId = _StringDescriptor(
'RcvAPATId', _required, strict=DEFAULT_STRICT,
docstring='Identifier of Receive Antenna pattern used to form the '
'channel.') # type: str
"""
str: The format of the vector data, constant value 'X=F8;Y=F8;Z=F8;' here.
"""
return 'X=F8;Y=F8;Z=F8;'
class UserDefinedPVPType(Serializable):
"""
A user defined PVP structure.
"""
_fields = ('Name', 'Offset', 'Size', 'Format')
_required = _fields
# descriptors
Name = _StringDescriptor(
'Name', _required, strict=DEFAULT_STRICT,
docstring='') # type: str
Offset = _IntegerDescriptor(
'Offset', _required, strict=DEFAULT_STRICT, bounds=(0, None),
docstring='') # type: int
Size = _IntegerDescriptor(
'Size', _required, strict=DEFAULT_STRICT, bounds=(1, None),
docstring='') # type: int
Format = _StringDescriptor(
'Format', _required, strict=DEFAULT_STRICT,
docstring='') # type: str
def __init__(self, Name=None, Offset=None, Size=None, Format=None, **kwargs):
"""
Parameters
derivativelyClassifiedBy = _StringDescriptor(
'derivativelyClassifiedBy', _required, strict=DEFAULT_STRICT,
docstring='') # type: Union[None, str]
classificationReason = _StringDescriptor(
'classificationReason', _required, strict=DEFAULT_STRICT,
docstring='') # type: Union[None, str]
nonUSControls = _StringDescriptor(
'nonUSControls', _required, strict=DEFAULT_STRICT,
docstring='') # type: Union[None, str]
derivedFrom = _StringDescriptor(
'derivedFrom', _required, strict=DEFAULT_STRICT,
docstring='') # type: Union[None, str]
declassDate = _StringDescriptor(
'declassDate', _required, strict=DEFAULT_STRICT,
docstring='') # type: Union[None, str]
declassEvent = _StringDescriptor(
'declassEvent', _required, strict=DEFAULT_STRICT,
docstring='') # type: Union[None, str]
declassException = _StringDescriptor(
'declassException', _required, strict=DEFAULT_STRICT,
docstring='') # type: Union[None, str]
typeOfExemptedSource = _StringDescriptor(
'typeOfExemptedSource', _required, strict=DEFAULT_STRICT,
docstring='') # type: Union[None, str]
dateOfExemptedSource = _StringDescriptor(
'dateOfExemptedSource', _required, strict=DEFAULT_STRICT,
docstring='') # type: Union[None, str]
SecurityExtensions = _ParametersDescriptor(
'SecurityExtensions', _collections_tags, _required, strict=DEFAULT_STRICT,
docstring='Extensible parameters used to support profile-specific needs related to '
'product security.') # type: ParametersCollection
self._xml_ns = kwargs['_xml_ns']
if '_xml_ns_key' in kwargs:
self._xml_ns_key = kwargs['_xml_ns_key']
self.CoreName = CoreName
self.MatchIndex = MatchIndex
self.Parameters = Parameters
super(MatchCollectionType, self).__init__(**kwargs)
class MatchType(Serializable):
"""The is an array element for match information."""
_fields = ('TypeId', 'CurrentIndex', 'NumMatchCollections', 'MatchCollections')
_required = ('TypeId',)
_collections_tags = {'MatchCollections': {'array': False, 'child_tag': 'MatchCollection'}}
# descriptors
TypeId = _StringDescriptor(
'TypeId', _required, strict=DEFAULT_STRICT,
docstring='The match type identifier. *Examples - "MULTI-IMAGE", "COHERENT" or "STEREO"*') # type: str
CurrentIndex = _IntegerDescriptor(
'CurrentIndex', _required, strict=DEFAULT_STRICT,
docstring='Collection sequence index for the current collection. That is, which collection in the '
'collection series (defined in MatchCollections) is this collection? '
'(1-based enumeration).') # type: int
MatchCollections = _SerializableListDescriptor(
'MatchCollections', MatchCollectionType, _collections_tags, _required, strict=DEFAULT_STRICT,
docstring='The match collections.') # type: List[MatchCollectionType]
def __init__(self, TypeId=None, CurrentIndex=None, MatchCollections=None, **kwargs):
"""
Parameters
----------
super(NoiseLevelType, self).__init__(**kwargs)
class ChannelParametersType(Serializable):
_fields = (
'Identifier', 'RefVectorIndex', 'FXFixed', 'TOAFixed', 'SRPFixed',
'SignalNormal', 'Polarization', 'FxC', 'FxBW', 'FxBWNoise', 'TOASaved',
'TOAExtended', 'DwellTimes', 'ImageArea', 'Antenna', 'TxRcv',
'TgtRefLevel', 'NoiseLevel')
_required = (
'Identifier', 'RefVectorIndex', 'FXFixed', 'TOAFixed', 'SRPFixed',
'Polarization', 'FxC', 'FxBW', 'TOASaved', 'DwellTimes')
_numeric_format = {
'FxC': '0.16G', 'FxBW': '0.16G', 'FxBWNoise': '0.16G', 'TOASaved': '0.16G'}
# descriptors
Identifier = _StringDescriptor(
'Identifier', _required, strict=DEFAULT_STRICT,
docstring='String that uniquely identifies this CPHD data channel.') # type: str
RefVectorIndex = _IntegerDescriptor(
'RefVectorIndex', _required, strict=DEFAULT_STRICT, bounds=(0, None),
docstring='Index of the reference vector for the channel.') # type: int
FXFixed = _BooleanDescriptor(
'FXFixed', _required, strict=DEFAULT_STRICT,
docstring='Flag to indicate when a constant FX band is saved for all signal '
'vectors of the channel.') # type: bool
TOAFixed = _BooleanDescriptor(
'TOAFixed', _required, strict=DEFAULT_STRICT,
docstring='Flag to indicate when a constant TOA swath is saved for all '
'signal vectors of the channel.') # type: bool
SRPFixed = _BooleanDescriptor(
'SRPFixed', _required, strict=DEFAULT_STRICT,
docstring='Flag to indicate when a constant SRP position is used all '
of each element are user defined.
"""
_fields = (
'Identifier', 'ElementFormat', 'X0', 'Y0', 'XSS', 'YSS', 'NODATA',
'XUnits', 'YUnits', 'ZUnits', 'Parameters')
_required = (
'Identifier', 'ElementFormat', 'X0', 'Y0', 'XSS', 'YSS',
'XUnits', 'YUnits', 'ZUnits')
_collections_tags = {
'Parameters': {'array': False, 'child_tag': 'Parameter'}}
# descriptors
XUnits = _StringDescriptor(
'XUnits', _required, strict=DEFAULT_STRICT,
docstring='The X units.') # type: str
YUnits = _StringDescriptor(
'YUnits', _required, strict=DEFAULT_STRICT,
docstring='The Y units.') # type: str
ZUnits = _StringDescriptor(
'ZUnits', _required, strict=DEFAULT_STRICT,
docstring='The Z units.') # type: str
Parameters = _ParametersDescriptor(
'Parameters', _collections_tags, _required, strict=DEFAULT_STRICT,
docstring='Other necessary free-form parameters.') # type: Union[None, ParametersCollection]
def __init__(self, Identifier=None, ElementFormat=None,
X0=None, Y0=None, XSS=None, YSS=None, NODATA=None,
XUnits=None, YUnits=None, ZUnits=None, Parameters=None, **kwargs):
"""
Parameters
----------