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 ...
随机推荐
- IOS CocoaPods详细使用方法
自从有了CocoaPods以后,这些繁杂的工作就不再需要我们亲力亲为了,只需要我们做好少量的配置工作,CocoaPods会为我们做好一切 一.什么是CocoaPods 1.为什么需要CocoaPo ...
- 解决reportNG中文乱码(转:http://www.it610.com/article/3626590.htm)
1.下载reportng源码 git clone https://github.com/dwdyer/reportng.git 2.修改AbstractReporter.java ...
- Confluence6.9配置邮件服务器
一.调整confluence服务 1.在confluence安装目录下的server.xml中加一段邮件服务器的配置,加在confluence的Context中 <Context path=&q ...
- 小记---------linux远程连接集群内其他机器mysql库
mysql -h -u maxwell -p#10.0.15.145 远程机器ip#-P 注意是大写P 端口#-u 用户#-p 密码
- 小记---------网页采集之selenium
1.元素定位 ID定位元素: findElement(By.id(“”)); 通过元素的名称定位元素: findElement(By.name(“”)); 通过元素的html中的位置定位元素 ...
- 基于XML配置Spring的自动装配
一.了解Spring自动装配的方式 采用传统的XML方式配置Bean组件的关键代码如下所示 <bean id="userMapper" class="edu.cn. ...
- LOJ 10214 计算器 题解
题面 k==1时,快速幂就好了: k==2时,exgcd就好了,但要注意取模范围的控制: k==3时,BSGS可以解决高次同余方程: 然后就可以开心的A掉了,但要注意特殊情况的特判 #include ...
- <<C++ Primer>> 术语表 (总) (待补充)
术语表 目录 第 1 章 开始 第 I 部分 C++基础 第 2 章 变量和基本类型 第 3 章 字符串, 向量和数组 第 4 章 表达式 第 5 章 语句 第 6 章 函数 第 7 章 类 第 II ...
- opencv滤镜-使用opencv实现各种图像滤镜特效
图像处理-滤镜 链接:https://mangoroom.cn/opencv/image-processing-filter.html opencv滤镜-实现晕影vignetting效果 链接:htt ...
- Spring Data Elasticsearch基本使用
目录 1. 创建工程 2. 配置application.yaml文件 3. 实体类及注解 4. 测试创建索引 5. 增删改操作 5.1增加 5.2 修改(id存在就是修改,否则就是插入) 5.3 批量 ...