简体   繁体   English

当被多边形覆盖时隐藏标签

[英]Hide labels when are covered from a polygon

I need to mask all labels from a layer when they are outside a covering vector.当它们位于覆盖向量之外时,我需要从图层中屏蔽所有标签。 On the image below there are contours;下图中有轮廓; the lines are visible only if they intersects a polygon from a mask layer that is excluded with a filter.这些线仅在与使用过滤器排除的遮罩层中的多边形相交时才可见。 I'm be able to hide the lines that doesn't intersects the polygon, but I can't do the same with the labels.我可以隐藏不与多边形相交的线,但我不能对标签做同样的事情。 在此处输入图像描述

I'm using QGIS 3.22, below the filter managed from atlas.我正在使用 QGIS 3.22,位于从 atlas 管理的过滤器下方。

在此处输入图像描述

You should to clip your polygon by mask before show the labels.在显示标签之前,您应该通过蒙版剪辑多边形。

You can do that using this tools:您可以使用以下工具执行此操作:

clip vector by mask layer按蒙版层剪辑矢量

enter image description here在此处输入图像描述

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

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