[gdal-dev] Retrieve number of layers with gdalpy

Chaitanya kumar CH chaitanya.ch at gmail.com
Wed Aug 11 05:49:05 EDT 2010


António,

GDALDataset::GetRasterCount doesn't have the same interface in Python. You
can get the value using the GDALDataset's member variable RasterCount in
Python.
Example:
http://trac.osgeo.org/gdal/browser/trunk/autotest/gcore/tiff_write.py?rev=19928#L764

2010/8/11 António Rocha <antonio.rocha at deimos.com.pt>

> Greetings
>
> I have a file Geotiff format (and other in GRIB) and I need to know how
> many layers of data I have in each one of them by using gdalPy. is it
> possible? (I don't want to use gdalinfo , I just want to get this value
> directly)
>
> Thanks
> Antonio
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 5356 (20100810) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.
/tʃaɪθənjə/ /kʊmɑr/
+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100811/4cd321ab/attachment.html


More information about the gdal-dev mailing list