[gdal-dev] GDALRasterBand::GetUnitType() is not available in Python

Even Rouault even.rouault at mines-paris.org
Sat Feb 14 07:31:55 EST 2009


FYI, I've just added GetUnitType() to SWIG bindings. Will be available in GDAL 
1.7.0.

If you can't wait, this can be backported to GDAL 1.6.0 with the following 
patch:

Index: swig/include/Band.i
===================================================================
--- swig/include/Band.i	(révision 16315)
+++ swig/include/Band.i	(copie de travail)
@@ -117,6 +117,10 @@
     return GDALSetRasterNoDataValue( self, d );
   }
   
+  const char* GetUnitType() {
+      return GDALGetRasterUnitType( self );
+  }
+  
   %apply (char **options) { (char **) };
   char** GetRasterCategoryNames( ) {
     return GDALGetRasterCategoryNames( self );




Le Monday 24 November 2008 23:15:14 Michal Migurski, vous avez écrit :
> Hello,
>
> I'm following up on this mail from a few months ago:
> 	http://lists.osgeo.org/pipermail/gdal-dev/2008-June/017358.html
>
> Have there been any patches or workarounds for this issue? I'm using a
> collection .dem files that mix feet & meters, and I can't see any
> other way to access the unit information.
>
> Thanks,
> -mike.
>
> ----------------------------------------------------------------
> michal migurski- mike at stamen.com
>                   415.558.1610
>
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev




More information about the gdal-dev mailing list