错误原因:Float32 is not supported for rendering。即栅格数据类型Float32不支持。

cmd中用GDAL查看。在波段中的数据类型是Float32的不支持渲染。

不支持的例子:

C:\Program Files\GDAL>gdalinfo D:\mapnik\mapnik-v2.2.0\shp\mapnik\tmean10_19.tif
Driver: GTiff/GeoTIFF
Files: D:\mapnik\mapnik-v2.2.0\shp\mapnik\tmean10_19.tif
Size is 3600, 3600
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 = (90.000000000000000,60.000000000000000)
Pixel Size = (0.008333333333333,-0.008333333333333)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
COMPRESSION=LZW
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 90.0000000, 60.0000000) ( 90d 0' 0.00"E, 60d 0' 0.00"N)
Lower Left ( 90.0000000, 30.0000000) ( 90d 0' 0.00"E, 30d 0' 0.00"N)
Upper Right ( 120.0000000, 60.0000000) (120d 0' 0.00"E, 60d 0' 0.00"N)
Lower Right ( 120.0000000, 30.0000000) (120d 0' 0.00"E, 30d 0' 0.00"N)
Center ( 105.0000000, 45.0000000) (105d 0' 0.00"E, 45d 0' 0.00"N)
Band 1 Block=3600x1 Type=Float32, ColorInterp=Gray
NoData Value=-3.3999999521443642e+038

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=Area
TIFFTAG_DATETIME=2014:10:18 12:08:22
TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
TIFFTAG_SOFTWARE=Adobe Photoshop CC 2014 (Macintosh)
TIFFTAG_XRESOLUTION=231.429
TIFFTAG_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=Blue

postgres查看:

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 anyway
case PT_8BSI:
// mapnik does not support signed anyway
case PT_8BUI:
return read_grayscale_band(bbox, width_, height_, hasnodata,
std::bind(read_uint8, &ptr_));
break;
case PT_16BSI:
// mapnik does not support signed anyway
case 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 anyway
case 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

Error: pgraster_wkb_reader: grayscale band type 10 unsupported的更多相关文章

  1. 编译Cython代码时遇到的问题: fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

    使用python setup.py build_ext --inplace命令编译cython代码, 出现以下错误: Compiling cython_example.pyx because it c ...

  2. Error setting null for parameter #10 with JdbcType

    转: Error setting null for parameter #10 with JdbcType OTHER . 2014年02月23日 11:00:33 厚积 阅读数 58535   my ...

  3. 解决log4j:WARN Error initializing output writer. log4j:WARN Unsupported encoding?的问题

    异常名:log4j:WARN Error initializing output writer. log4j:WARN Unsupported encoding? 异常截图: 在一般的javaweb项 ...

  4. caffe: fuck compile error again : error: a value of type "const float *" cannot be used to initialize an entity of type "float *"

    wangxiao@wangxiao-GTX980:~/Downloads/caffe-master$ make -j8find: `wangxiao/bvlc_alexnet/spl': No suc ...

  5. 解决ERROR C2011: 'FD_SET' : 'STRUCT' TYPE REDEFINITION问题

    在socket编程的过程中头文件中 #include <windows.h> #include "stdafx.h" #include "WinSock2.h ...

  6. fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'

    xxxxxx.lib(xxxxxx.obj) : fatal error LNK1112: module machine type 'X86' conflicts with target machin ...

  7. configure: error: cannot guess build type; you must specify one解决方法

    原文地址:https://blog.csdn.net/hebbely/article/details/53993141 1.configure: error: cannot guess build t ...

  8. VC中编译报错:error C2011: 'fd_set' : 'struct' type redefinition

    这是头文件包含顺序的问题,原因与解决办法见下面代码的注释. /* 包含下面这两个头文件时,必须把winsock2.h放在前面 否则编译报错,N多的重定义错误:例如 error C2011: 'fd_s ...

  9. unity c# script error CS0664: Literal of type double cannot be implicitly converted to type `float'. Add suffix `f' to create a literal of this type

    例如在unity c# script中定义 private float x=0.0; 则会报 error CS0664: Literal of type double cannot be implic ...

随机推荐

  1. OpenCV 中获取图像或矩阵最大、最小值的简便方法

    C++: void minMaxLoc(InputArray src, double* minVal, double* maxVal=0, Point* minLoc=0, Point* maxLoc ...

  2. ugui多层解决方案

    创建不同的相机图层以渲染事物(最佳实践解决方案) 链接:https://answers.unity.com/questions/1169898/hi-guys-i-need-some-help-wit ...

  3. 华为HCNA乱学Round 3:华为基础

  4. 【VS开发】动态创建ActiveX控件

    bool CCollectDataDlgDlg::CreateMyCtrl(LPRECT lpRect, UINT nID, CWnd *pParent) {  CLSID clsid;  wstri ...

  5. Visual Subst - 简单将任意文件夹挂载模拟成驱动器盘符硬盘分区的小工具

    随着电脑的使用,硬盘里的资料一天比一天多,也越来越杂乱.一些朋友为了方便文件管理,会考虑重新分区,让C.D.E等盘符分别担任不同的角色.不过,不分区的话也有一些小工具可以帮你实现. Visual Su ...

  6. 百度之星 2019 预赛三 A 最短路 1

    题目链接 分析 异或运算满足「三角不等式」. $\forall a, b, c \in \mathbb{Z}_{\ge 0}$,有 $a \xor b \le (a \xor c) + (c \xor ...

  7. mapper中通过resultMap自定义查询结果映射

    mybatis中使用resultType做自动映射时,要注意字段名和pojo的属性名必须一致,若不一致,则需要给字段起别名,保证别名与属性名一致. 使用resultMap做自定义结果映射,字段名可以不 ...

  8. [TJOI2019] 甲苯先生的线段树

    臭名昭著的巧合:CF750G 题意:在无限深度的一颗线段树中询问编号和为S的简单路径条数. 题解传送门 这道题相当于在原来基础上多了询问两点间简单路径的编号的的问题. 直觉告诉我们只需要求出两点在线段 ...

  9. vue 实践技巧合集

    前言 本文纯属个人平时实践过程中的一些经验总结,算是一点点小技巧吧,不是多么高明的技术,如果对你有帮助,那么不胜荣幸. 本文不涉及罕见API使用方法等,大部分内容都是基于对vue的一些实践而已.由于涉 ...

  10. Python 进阶篇

    作者:武沛齐 出处:http://www.cnblogs.com/wupeiqi/articles/5246483.html Model 到目前为止,当我们的程序涉及到数据库相关操作时,我们一般都会这 ...