 
 
 datasetGeotransformIO :: Dataset s a t -> IO (Maybe Geotransform)
-datasetGeotransformIO ds = alloca $ \p -> do
-  ret <- {#call unsafe GetGeoTransform as ^#} (unDataset ds) (castPtr p)
+datasetGeotransformIO = datasetHGeotransformIO . unDataset
+
+datasetGeotransform :: Dataset s a t -> GDAL s (Maybe Geotransform)
+datasetGeotransform = liftIO . datasetGeotransformIO
+
+datasetHGeotransformIO :: DatasetH -> IO (Maybe Geotransform)
+datasetHGeotransformIO ds = alloca $ \p -> do
+  ret <- {#call unsafe GetGeoTransform as ^#} ds (castPtr p)
   if toEnumC ret == CE_None
     then liftM Just (peek p)
     else return Nothing
-
-datasetGeotransform :: Dataset s a t -> GDAL s (Maybe Geotransform)
-datasetGeotransform = liftIO . datasetGeotransformIO
-
 
 setDatasetGeotransform :: Geotransform -> RWDataset s a -> GDAL s ()
 setDatasetGeotransform gt ds = liftIO $

      | p==nullDatasetH = Just (fromMaybe
                                (GDALBindingException NullDataset) exc)
      | otherwise       = Nothing
    free ds = do
      refCount <- {#call unsafe DereferenceDataset as ^#} ds
      when (refCount<=0) ({#call GDALClose as ^#} ds)

createMem
  :: Size -> Int -> DataType d -> OptionList

  ix <- datasetBandCount ds
  getBand ix ds
  where dt = hsDataType (Proxy :: Proxy a)


bandBlockSize :: (Band s a t) -> Size
