def geotransform(self, values): "Set the geotransform for the data source." if len(values) != 6 or not all(isinstance(x, (int, float)) for x in values): raise ValueError('Geotransform must consist of 6 numeric values.') # Create ctypes double array with input and write data values = (c_double * 6)(*values) capi.set_ds_geotransform(self._ptr, byref(values)) self._flush()
def geotransform(self, values): "Sets the geotransform for the data source." if sum([isinstance(x, (int, float)) for x in values]) != 6: raise ValueError('Geotransform must consist of 6 numeric values.') # Create ctypes double array with input and write data values = (c_double * 6)(*values) capi.set_ds_geotransform(self._ptr, byref(values)) self._flush()
def geotransform(self, values): "Set the geotransform for the table_s source." if len(values) != 6 or not all( isinstance(x, (int, float)) for x in values): raise ValueError('Geotransform must consist of 6 numeric values.') # Create ctypes double array with input and write table_s values = (c_double * 6)(*values) capi.set_ds_geotransform(self._ptr, byref(values)) self._flush()
capi.get_ds_geotransform(self._ptr, byref(gtf)) return list(gtf) @geotransform.setter def geotransform(self, values): <<<<<<< HEAD "Sets the geotransform for the data source." if sum([isinstance(x, (int, float)) for x in values]) != 6: ======= "Set the geotransform for the data source." if len(values) != 6 or not all(isinstance(x, (int, float)) for x in values): >>>>>>> 37c99181c9a6b95433d60f8c8ef9af5731096435 raise ValueError('Geotransform must consist of 6 numeric values.') # Create ctypes double array with input and write data values = (c_double * 6)(*values) capi.set_ds_geotransform(self._ptr, byref(values)) self._flush() @property def origin(self): """ Coordinates of the raster origin. """ return TransformPoint(self, 'origin') @property def scale(self): """ Pixel scale in units of the raster projection. """ return TransformPoint(self, 'scale')