[gdal-dev] Python syntax for Terragen band::SetUnitType()
Frank Warmerdam
warmerdam at pobox.com
Sun Jun 12 13:47:19 EDT 2011
On 11-06-12 01:38 PM, Chris English wrote:
>
> Hi,
> What is the proper Python syntax for SetUnitType("m") for Terragen ?
>>>> type(dst_ds)<class 'osgeo.gdal.Dataset'>
> The dataset (Terragen) exists, and (I think) in order for the MIN/MAXUSERPIXELVALUESto make sense it seems you'd have to SetUnitType() prior to WritingArrayin the same way you'd establish SetGeoTransform() etc before WriteArray.
> dst_ds.SetGeoTransform ~
Chris,
I haven't tried it, but it should be something like:
ds.GetRasterBand(1).SetUnitType("m")
where "ds" is the gdal.Dataset you got from this Create() method.
I have confirmed there is a Python wrapper for this method.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the gdal-dev
mailing list