Error: pgraster_wkb_reader: grayscale band type 10 unsupported
错误原因: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的更多相关文章
- 编译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 ...
- 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 ...
- 解决log4j:WARN Error initializing output writer. log4j:WARN Unsupported encoding?的问题
异常名:log4j:WARN Error initializing output writer. log4j:WARN Unsupported encoding? 异常截图: 在一般的javaweb项 ...
- 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 ...
- 解决ERROR C2011: 'FD_SET' : 'STRUCT' TYPE REDEFINITION问题
在socket编程的过程中头文件中 #include <windows.h> #include "stdafx.h" #include "WinSock2.h ...
- 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 ...
- 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 ...
- VC中编译报错:error C2011: 'fd_set' : 'struct' type redefinition
这是头文件包含顺序的问题,原因与解决办法见下面代码的注释. /* 包含下面这两个头文件时,必须把winsock2.h放在前面 否则编译报错,N多的重定义错误:例如 error C2011: 'fd_s ...
- 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 ...
随机推荐
- 【java基础之异常】死了都要try
目录 1.异常 1.1 异常概念 1.2 异常体系 1.3 异常分类 1.4 异常的产生过程解析 2. 异常的处理 2.1 抛出异常throw 2.2 Objects非空判断 2.3 声明异常thro ...
- java课堂疑问解答与思考2
问题一 编写一个方法,使用以上算法生成指定数目(比如1000个)的随机整数. 答:Xn+1=(7^5*Xn)mod(2^31-1) 程序源码: import java.util.Random; imp ...
- Ubuntu系统挂载磁盘硬盘
在电脑(Ubuntu16.04)新装了一个硬盘,然后只有挂载了我们才能正常使用,下面总结一下挂载的过程. 首先,打开命令行输入命令: sudo fdisk -l 可以看到:磁盘格式化后 硬盘格式化 命 ...
- 论文翻译:HetConv-Heterogeneous Kernel-Based Convolutions for Deep CNNs
Abstract 我们提出了一种新颖的深度学习架构,其中卷积操作利用了异构内核.与标准卷积运算相比,所提出的HetConv(基于异构内核的卷积)减少了计算(FLOPs)和参数的数量,同时仍保持表示效率 ...
- python 并发编程 异步IO模型
异步IO(Asynchronous I/O) Linux下的asynchronous IO其实用得不多,从内核2.6版本才开始引入.先看一下它的流程: 用户进程发起read操作之后,立刻就可以开始去做 ...
- linux文件过多导致移动失败解决办法
1. cd /sdzw/data/infogateftp/srcdata/ibp/account_rulelog ls | xargs -t -I {} mv {} /sdzw/data/in ...
- 如何在linux下安装idea
[通过官方安装包安装] 在 http://www.jetbrains.com/ 官网下载对应版本. ultimate 旗舰版 community 社区版 然后解压到本地对应目录,打开idea目录下的b ...
- Linux MFS分布式文件系统介绍和安装
MFS分布式文件系统 mooseFS(moose 驼鹿)是一款网络分布式文件系统.它把数据分散在多台服务器上,但对于用户来讲,看到的只是一个源.MFS也像其他类unix文件系统一样,包含了层级结构(目 ...
- 修改Docker0网桥默认网段
Docker--修改Docker0网桥默认网段 修改文件 /etc/docker/daemon.json 添加内容 "bip": "ip/netmask" [ ...
- 分位数回归及其Python源码
分位数回归及其Python源码 天朗气清,惠风和畅.赋闲在家,正宜读书.前人文章,不得其解.代码开源,无人注释.你们不来,我行我上.废话少说,直入主题.o( ̄︶ ̄)o 我们要探测自变量 与因变量 的关 ...