为什么井 运行 视图在 Geoserver 的本机边界框中获得零值?

Why a well running view gets zero values in the native bounding box in Geoserver?

我正在远程数据库上工作,我拥有作为用户的所有权限。我创建了一个由 5 table 组成的空间关系数据库,其中一个具有几何列。当我尝试仅发布具有 srid GGRS87 EPSG:2100 几何的 table 时,本机 bbox 计算良好但是当我尝试从 PostGIS 或通过 Geoserver 创建视图时,本机 BBox 给出值 (-1,-1,0,0) 并且 Lat/Lon BBox 在数据库中没有正确的 ones.The 视图运行正确,合并所有 5 tables.Lastly,我注意到当我通过 Geoserver 创建视图时,SRID 列没有显示,无法从那里进行设置。

PostGIS 和 Geoserver 之间的连接可能出了什么问题,或者是其他什么? 谢谢!

CREATE VIEW buildings AS
SELECT 
  id_owner,id_building,address_name,address_num,
  region,x,y,closing_file
FROM owner
JOIN owner_property 
  ON owner.id_owner = owner_property.owner_id
JOIN building 
  ON property.building_id=building.id_building;

您的视图似乎没有几何图形,因此没有 SRS。您很可能忘记将其插入视图中,或者如您的屏幕截图所示,坐标对分为两列 - xy。因此,只需在用于创建视图的查询中将 ST_MakePointxy 一起使用 ..

CREATE VIEW buildings_reinspection_file AS
SELECT 
  id_owner,id_building,address_name,address_num,
  region,inspection_num,reinspection_num,reinspection_date,
  approval_num,ownership_perc,building_assessm,color_tagged,
  construction_type,ST_MakePoint(x,y,2100),closing_file
FROM owner
JOIN owner_property 
  ON owner.id_owner = owner_property.owner_id
JOIN property 
  ON owner_property.property_id = property.id_property
JOIN building 
  ON property.building_id=building.id_building
JOIN financial_assist 
  ON property.financial_assist_id=financial_assist.id_financial_assist;

.. 并尝试在 GeoServer 中再次发布它。如果您在 table building 中创建的包含几何的列名为 point,只需将 ST_MakePoint(x,y,2100) 替换为 building.point