阅读:2317回复:5
遇到奇怪问题,探讨探讨
我的想法是要把栅格文件类型中每个cell的值读出来,现在只能做出有某个值的cell有多少个(如值是5的cell有1022个)。但是遇到了奇怪的问题,我这段码对jpg,dem等都有效,不过遇到由ploygon转过来(用feature to raster)的栅格文件就会出现错误,此栅格文件有属性表。错误截图附上,请问是为什么??大家讨论下!
[此贴子已经被作者于2006-10-4 16:18:12编辑过]
|
|
|
1楼#
发布于:2006-10-14 16:53
我发现有些有属性表的栅格文件也能用,只不过它的pixle type是unsigned integer的,这个unsigned integer是什么意思,有什么办法可以把signed integer的改成unsigned integer的
|
|
|
2楼#
发布于:2006-10-10 12:19
兄弟们有没遇到过这种问题啊??
|
|
|
3楼#
发布于:2006-10-08 22:02
![]() ![]() |
|
|
4楼#
发布于:2006-10-07 21:05
![]() ![]() |
|
5楼#
发布于:2006-10-07 10:19
Sub countnumber() Dim pMap As IMap Dim pRasterlayer As IRasterLayer Dim pRaster As IRaster Dim pRasBC As IRasterBandCollection Dim pRasterBand As IRasterBand ' This example shows the usage of the IRawPixels interface to ' QI for the IRasterProps interface to get height and width Dim pPnt As IPnt ' Use the RawPixels interface to create a new PixelBlock ' get the variant SafeArray from the pixelblock Dim i As Long, j As Long, sum As Long, value As Double value = InputBox("请输入元胞的值:", "输入框") For i = 0 To pProps.Width - 1 MsgBox "此栅格图层中值为" ; value ; "的元胞有" ; sum ; "个" End Sub |
|
|