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 ...
随机推荐
- 在线运行.NET代码
https://dotnetfiddle.net/ https://try.dot.net/ C# 发送Http协议 模拟 Post Get请求 1.参数 paramsValue的格式 要和 Requ ...
- Opencv中copyTo()函数的使用方法
在Mat矩阵类的成员函数中copyTo(roi , mask)函数是非常有用的一个函数,尤其是后面的mask可以实现蒙版的功能,我们用几个实例来说明它的作用.我们要注意mask的数据类型,必须是CV_ ...
- LoadRunner12.53录制手机应用
1 打开LR12.53 选择File-new script and solution: 2 选择录制协议输入脚本名称和位置点击create: 3 点击设置录制选项: 4 设置代理及端口: 5 点击开始 ...
- 解一元二次方程的C++实现
一元二次方程的根的情况分为实根与虚根两种,代码如下 #include<iostream> #include<cmath> using namespace std; float ...
- Dialupass v3.20 汉化绿色版 显示查看拨号上网密码
Dialupass 显示查看拨号上网密码 拨号上网的密码不小心丢了怎么办?这个工具可以帮你!在紧要关头,它会让你体验到它的奇效!有备无患,快收藏这个小东东吧. 这是一款拯救忘记了拨号网络密码的使用者的 ...
- 20191209 Linux就该这么学(4)
4. Vim编辑器与Shell命令脚本 Vim 编辑器中设置了三种模式-命令模式.末行模式和编辑模式. 命令模式:控制光标移动,可对文本进行复制.粘贴.删除和查找等工作. 输入模式:正常的文本录入. ...
- Synchronized及其实现原理(一)
一.Synchronized的基本使用 Synchronized是Java中解决并发问题的一种最常用的方法,也是最简单的一种方法.Synchronized的作用主要有三个:(1)确保线程互斥的访问同步 ...
- MySQL -3- 基础应用
1.数值类型 TINYINT --极小整数SMALLINT --较小整数MEDIUMINT --中型整数INT --常规整数BIGINT --较大整数FLOAT --小型单精度DOUBLE --常规双 ...
- Magic Potion(网络流)
原题链接 2018南京的铜牌题,听说学长他们上来就A了,我这个图论选手也就上手做了做,结果一言难尽...... 发此篇博客希望自己能牢记自己的菜... 本题大意:有n个heros和m个monsters ...
- java实现稀疏数组压缩
package sparseArray; public class SparseArray { public static void main(String[] args) { // TODO Aut ...