[Gdal-dev] Re: [R-sig-Geo] working with Z values in spatial data
frames
Frank Warmerdam
warmerdam at pobox.com
Sun Nov 11 23:44:29 EST 2007
Michael Sumner wrote:
> I know GDAL allows it, and it flows naturally into the data.frame model
> in R, but the GDAL gods consider the case of multiple bands of different
> types to be pathological. (I think).
>
> This will give you the matrix:
>
> as.image.SpatialGridDataFrame()$z
>
> That's not a class-definition based "as" coercer, because "image" is not
> a class. It's just a well supported data structure in R.
Mike,
I consider the case of bands with a mixture of data types in a single
dataset uncommon. Currently it works fine for reading, but the Create()
assumes that all bands of a newly created dataset will be of the same type.
So it is ackward to create mixed band type datasets. It can be done in a
few cases by using the AddBand() method to create new bands of alternate
types after creating a base dataset.
Only a few datasets support mixed types (ie. HFA, PCIDSK, VRT, MEM).
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 | President OSGeo, http://osgeo.org
More information about the gdal-dev
mailing list