Error: pgraster_wkb_reader: grayscale band type 10 unsupported
生活随笔
收集整理的這篇文章主要介紹了
Error: pgraster_wkb_reader: grayscale band type 10 unsupported
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
錯誤原因:Float32 is not supported for rendering。即柵格數據類型Float32不支持。
cmd中用GDAL查看。在波段中的數據類型是Float32的不支持渲染。
不支持的例子:
postgres查看:
CONSTRAINT enforce_pixel_types_rast CHECK (_raster_constraint_pixel_types(rast) = '{32BF}'::text[]),支持的例子:
Driver: GTiff/GeoTIFF Files: D:\mapnik\mapnik-v2.2.0\shp\mapnik\HYP_LR.tif Size is 16200, 8100 Coordinate System is: GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]] Origin = (-180.000000000000000,90.000000000000000) Pixel Size = (0.022222222222220,-0.022222222222220) Metadata:AREA_OR_POINT=AreaTIFFTAG_DATETIME=2014:10:18 12:08:22TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)TIFFTAG_SOFTWARE=Adobe Photoshop CC 2014 (Macintosh)TIFFTAG_XRESOLUTION=231.429TIFFTAG_YRESOLUTION=231.429 Image Structure Metadata:INTERLEAVE=PIXEL Corner Coordinates: Upper Left (-180.0000000, 90.0000000) (180d 0' 0.00"W, 90d 0' 0.00"N) Lower Left (-180.0000000, -90.0000000) (180d 0' 0.00"W, 90d 0' 0.00"S) Upper Right ( 180.0000000, 90.0000000) (180d 0' 0.00"E, 90d 0' 0.00"N) Lower Right ( 180.0000000, -90.0000000) (180d 0' 0.00"E, 90d 0' 0.00"S) Center ( -0.0000000, 0.0000000) ( 0d 0' 0.00"W, 0d 0' 0.00"N) Band 1 Block=16200x1 Type=Byte, ColorInterp=Red Band 2 Block=16200x1 Type=Byte, ColorInterp=Green Band 3 Block=16200x1 Type=Byte, ColorInterp=Bluepostgres查看:
CONSTRAINT enforce_pixel_types_rast CHECK (_raster_constraint_pixel_types(rast) = '{8BUI,8BUI,8BUI}'::text[]),pgraster插件源碼查看/mapnik/plugins/input/pgraster/pgraster_wkb_reader.cpp:
switch (pixtype) {case PT_1BB:case PT_2BUI:case PT_4BUI:// all <8BPP values are wrote in full bytes anywaycase PT_8BSI:// mapnik does not support signed anywaycase PT_8BUI:return read_grayscale_band(bbox, width_, height_, hasnodata,std::bind(read_uint8, &ptr_));break;case PT_16BSI:// mapnik does not support signed anywaycase PT_16BUI:return read_grayscale_band(bbox, width_, height_, hasnodata,std::bind(read_uint16, &ptr_, endian_));break;case PT_32BSI:// mapnik does not support signed anywaycase PT_32BUI:return read_grayscale_band(bbox, width_, height_, hasnodata,std::bind(read_uint32, &ptr_, endian_));break;default:std::ostringstream err;err << "pgraster_wkb_reader: grayscale band type "<< pixtype << " unsupported";//MAPNIK_LOG_WARN(pgraster) << err.str();throw mapnik::datasource_exception(err.str());}這里可以發現支持的格式類型,滿足這些類型就行,否則報錯。
https://github.com/mapnik/mapnik/issues/3324
https://github.com/systemapic/pile/issues/30
轉載于:https://www.cnblogs.com/TTonly/p/10349940.html
總結
以上是生活随笔為你收集整理的Error: pgraster_wkb_reader: grayscale band type 10 unsupported的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 线性可分 与线性不可分
- 下一篇: 安装class-dump