def __init__(self, *args, **kwargs): if not is_field(self._get_field_()): raise TypeError('Host collection must be a field.') kwargs = kwargs.copy() self.crs = kwargs.pop(KeywordArgument.CRS, 'auto') self._wrapped_state = None self.wrapped_state = kwargs.pop(KeywordArgument.WRAPPED_STATE, 'auto') super(AbstractInterfaceObject, self).__init__(*args, **kwargs)
def __init__(self, **kwargs): kwargs = kwargs.copy() crs = kwargs.pop(KeywordArgument.CRS, 'auto') parent = kwargs.pop(KeywordArgument.PARENT, None) name = kwargs.pop(KeywordArgument.NAME, None) driver = kwargs.pop(KeywordArgument.DRIVER, None) assert len(kwargs) == 0 if parent is not None and not is_field(parent): raise ValueError("'parent' object must be a field") AbstractContainer.__init__(self, name, parent=parent) AbstractOperationsSpatialObject.__init__(self, crs=crs) if driver is not None: self.parent.set_driver(driver)