简体   繁体   English

PostGIS/GeoServer 中的重叠多边形

[英]Overlapping Polygons in PostGIS/GeoServer

I have a set of polygons stored in PostGIS and served by GeoServer WMS.我有一组存储在 PostGIS 中并由 GeoServer WMS 提供服务的多边形。 The problem is the polygons have overlap, which makes the labels misplaced in different zoom levels.问题是多边形有重叠,这使得标签在不同的缩放级别中错位。 To solve the problem, I tried to intersect the polygons recursively and add up the attributes of the polygons that share a space.为了解决这个问题,我尝试递归地与多边形相交,并将共享空间的多边形的属性相加。 I came across this solution: PostGIS recursive intersection between polygons .我遇到了这个解决方案: PostGIS recursive cross between polygons It works perfectly with the test dataset but does not work with my data.它适用于测试数据集,但不适用于我的数据。 In my own dataset I tried to do the same but with a column called "hrv".在我自己的数据集中,我尝试做同样的事情,但使用名为“hrv”的列。

Here is a link to my data (shapefile)这是我的数据的链接(shapefile)

It is much appreciated if anyone has an idea on either how to make that solution working on my data or configuring GeoServer to handle the labeling.如果有人知道如何使该解决方案处理我的数据或配置 GeoServer 以处理标签,我们将不胜感激。

Maybe you can check this example from the Geoserver v2.6 guide.也许您可以从 Geoserver v2.6 指南中查看此示例 It shows the sld to put the labels in the center of the polygon and wrap it with a fixed size to split the labels in multiple lines.它显示 sld 将标签放在多边形的中心并用固定大小包裹它以将标签分成多行。

It it does not work try to paste a screenshot of your problem and the sld that you are using to give a more accurate answer.尝试粘贴您的问题的屏幕截图和您正在使用的 sld 以提供更准确的答案是行不通的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM