GIS:需要将数据添加到形状文件中
我之前尝试发布这个问题,但没有成功,所以我再次尝试,
将一个形状(点集)文件导入到 postgres 中,并在 postgres 中有一个包含附加数据的表(hist_info)。我尝试使用每个文件中需要的数据创建一个视图,但由于某种原因,我无法弄清楚为什么我的 GIS 图层(在 geoserver 中创建)是空白的。 SELECT * FROM new_view 显示视图创建的表中有数据......
所以我的问题是 1. 我必须在 VIEW 中包含哪些数据,以便新创建的 VIEW 将显示为点并在单击点时显示添加的数据?
- 组合这两个文件的最佳方法是什么,以便当有人单击浏览中显示的地图上的点之一时,我可以显示 hist_info 表中的数据?
感谢您的帮助!
问候 克里斯
I tried posting this question earlier but was unsuccessful so I'm trying again
I imported a shape (set of points) file into postgres and have a table (hist_info) with additional data also in postgres. I tried creating a VIEW with data that I need from each files but for a reason I can't figure out as to why my GIS layer (created in geoserver) is blank. A SELECT * FROM new_view shows there is data in the table created by the VIEW....
So my questions are
1. What data must I include in the VIEW in order for the newly created VIEW will display as points and show the added data when a point is clicked on?
- What is the best way to combine the two files so that I can display the data from the hist_info table when someone click on one of the points on the map displayed in their browse?
Thanks for the help!!
Regards
Chris
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要在geometry_columns 表中插入一条记录,否则GeoServer 将无法读取视图的几何图形。看看这个:
http: //docs.geoserver.org/stable/en/user/data/postgis.html#publishing-a-postgis-view
You need to insert a record in the geometry_columns table or GeoServer won't read your view's geometry. Have a look at this:
http://docs.geoserver.org/stable/en/user/data/postgis.html#publishing-a-postgis-view