如何通过 GeoServer 提供 tiff WMS 图像
我是地理服务器/数据库世界的新手。我以前从未做过任何数据库工作,但作为学生实习的一部分,我需要使用 GeoServer 设置 WMS。
我在独立模式下使用 GeoServer 2.0.1(使用 Jetty 下载)并安装了 PostgreSQL 8.4。我在 GeoServer 文档中完成了 nyc_roads 和 nyc_buildings 安装演示,但我仍然不明白应该如何提供一些测试图像。我注意到 nyc_roads 设置包含一个负责设置 nyc_buildings 数据库的 .sql 文件。我不知道这个文件是如何/在哪里生成的。
我们的测试图像是.tiff 和.jpeg。我已经成功地能够在本地 GeoServer 计算机上进行 WMS 调用,并打开了包含的演示图像。我现在希望将这些 .tiff 和 .jpeg 图像添加到 GeoServer 并通过 WMS 访问它们。我尝试将图像复制到 GeoServer 数据目录,添加新的数据存储和图层,但我总是收到有关输入流
的错误。
如果我遗漏了重要信息,我很抱歉,这就是我所知道的。
编辑:
正如下面的评论中所述,我很困惑为什么 GeoServer 不会发布 GeoTiff 图像层。我为其创建了一个单独的工作区和数据存储。当我添加 GeoTiff 图像时,可以正确读取边界框/地理坐标以及正确的 EPSG 格式。当我对设置感到满意时,我单击“保存”,但没有任何反应。没有错误消息或警告。
I am new to the GeoServer/database world. I have never done any database work before, but I need to set up a WMS using GeoServer as part of my student internship.
I am using GeoServer 2.0.1 in standalone mode (downloaded using Jetty) with PostgreSQL 8.4 installed. I went through nyc_roads
and nyc_buildings
install demo in the GeoServer documentation but I still do not understand how I should go about serving up some test images. I noticed that the nyc_roads
setup included a .sql file that was responsible for setting up the nyc_buildings
database. I do not know how/where this file was generated.
Our test images are .tiff and .jpeg. I have successfully been able to do a WMS call on the local GeoServer machine, and have opened the included demo imagery. I now wish to add these .tiff and .jpeg images to GeoServer and access them through WMS. I have tried copying the images to the GeoServer data directory, adding a new data store and layers, but I always receive an error regarding the input stream
.
I am sorry if I am leaving out vital information, this is as much as I know.
EDIT:
As described in the comment below, I am confused as to why GeoServer wont publish a GeoTiff image layer. I've made a separate workspace and data store for it. When I go to add the GeoTiff image, the bounding boxes/Geo coordinates are read properly, along with the correct EPSG format. When I'm happy with the settings, I click save, but nothing happens. No error messages or warnings.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将 GeoTIFF (*.tif) 文件上传到服务器上的文件夹。
打开 GeoServer 主页。登录服务器(默认用户 admin pwd geoserver)。选择左侧菜单中的“工作空间”。
创建一个新工作区并根据需要将其命名为任意名称。

创建新商店

并选择 GeoTIFF。

单击文件名旁边的“浏览”按钮并选择您的 GeoTIFF。

如果正确创建,边界框应显示正确的坐标。选择 WMS 服务(非常重要)。
请查看本教程以了解完整的运行过程。
使用 Openlayers 从 JavaScript 调用 WMS 层。
Upload your GeoTIFF (*.tif) file to a folder on your server.
Open GeoServer home. Sign in to the server (default user admin pwd geoserver). Select WORKSPACES on the left menu.
Create a new workspace and call it whatever you want.

Create a new store

and choose GeoTIFF.

Click on the BROWSE button next to the fileName and select your GeoTIFF.

If it is properly created, the bounding box should appear with the correct coordinates. Select WMS service (VERY IMPORTANT).
Check this tutorial for a complete run through.
Call WMS layer from JavaScript using Openlayers.