为什么 UMN-Mapserver 将 ERDAS 图像文件 (.img) 显示为白色形状?
我想使用 UMN-Mapserver 渲染 ERDAS-Image-file(后缀 .img)。数据以正确的位置和正确的形状呈现,但所有数据都是白色而不是光栅图像。图像包含许多层。我的地图文件如下所示:
MAP
NAME "Test"
WEB
METADATA
"wms_title" "test"
"WMS_SRS" "epsg:31466 epsg:31467 epsg:31468 epsg:31469 epsg:4326 epsg:25832 epsg:3035"
END
LOG "test.log"
IMAGEPATH "."
END
SHAPEPATH "."
PROJECTION
"init=epsg:32632"
END
LAYER
NAME "testlayer"
TYPE RASTER
DATA "test.img"
STATUS ON
OFFSITE 0 0 0
END
OUTPUTFORMAT
NAME png
DRIVER "GD/PNG"
MIMETYPE "image/png"
IMAGEMODE RGBA
END
END
I want to render an ERDAS-Image-file (suffix .img) with the UMN-Mapserver. The data is rendered on the right position and with the correct shape, but all data is white instead of an raster-image. The Image contains many layers. My mapfile looks like this:
MAP
NAME "Test"
WEB
METADATA
"wms_title" "test"
"WMS_SRS" "epsg:31466 epsg:31467 epsg:31468 epsg:31469 epsg:4326 epsg:25832 epsg:3035"
END
LOG "test.log"
IMAGEPATH "."
END
SHAPEPATH "."
PROJECTION
"init=epsg:32632"
END
LAYER
NAME "testlayer"
TYPE RASTER
DATA "test.img"
STATUS ON
OFFSITE 0 0 0
END
OUTPUTFORMAT
NAME png
DRIVER "GD/PNG"
MIMETYPE "image/png"
IMAGEMODE RGBA
END
END
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
回答我自己的问题:输入文件每个通道有 16 位,但没有成功。地图服务器可以缩放颜色,但您需要来自了解图像的人员的数据。就我而言,据说我的缩放范围为 0-22000,因此我在图层定义中写入了以下行:
效果很好,现在我可以看到图像中的结构。如果您不知道正确的比例,您可以尝试以下方法,
希望这对将来遇到同样问题的人有所帮助。
To give an answer to my own question: The input-file had 16 Bit per channel and that didn't worked out. The mapserver can scale the colors, but you need the data from the people, that have knowledge about the image. In my case, I was said to scale from 0-22000, so I wrote the following line to the layer-definition:
That worked well, now I can see structure in the image. If you don't know about the correct scale, you could try the following
I hope this helps someone, who runs into the same trouble in the future.