为什么 UMN-Mapserver 将 ERDAS 图像文件 (.img) 显示为白色形状?

发布于 2024-09-02 05:54:29 字数 859 浏览 6 评论 0原文

我想使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

月棠 2024-09-09 05:54:29

回答我自己的问题:输入文件每个通道有 16 位,但没有成功。地图服务器可以缩放颜色,但您需要来自了解图像的人员的数据。就我而言,据说我的缩放范围为 0-22000,因此我在图层定义中写入了以下行:

PROCESSING "SCALE=0,22000"

效果很好,现在我可以看到图像中的结构。如果您不知道正确的比例,您可以尝试以下方法,

PROCESSING "SCALE=AUTO"

希望这对将来遇到同样问题的人有所帮助。

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:

PROCESSING "SCALE=0,22000"

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

PROCESSING "SCALE=AUTO"

I hope this helps someone, who runs into the same trouble in the future.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文