1

I want to use the topology checker to check if point features are covered by line features. For example are the bus stops covered by the bus lines.Therefore I use the topology checker with the following rule: "points" must be covered by "lines". enter image description here

"Haltestellen" = bus stops and "Buslinien" = bus lines

But I get the error for all points that "point is not covered by segment".

enter image description here

I even get the error for points that I edited on the line with snapping.

Here are my questions:

  1. Is it possible to check if point features are covered by line features? With topology checker? In general?
  2. What does the rule: "points" must be covered by "lines" check? Under what cicumstances is a point feature covered by a line feature?

I tried this in QGIS Versions 2.18; 3.4 and 3.10

My OS is Windows 10.

I tried with shapefiles and geopackage layers

The CBS of point and line layers are the same. Here I tried the coordinate systems with epgs: 31468 (DHDN / 3-degree Gauss-Kruger zone 4) and 25832 (ETRS89 / UTM zone 32N).

Can anyone explain or point me to the right direction?

3
  • Just as an idea: for those who know how to do it, setting up a Virtual Layer with some spatialite commands should be able to query your two layers and show you the state of your points on-the-fly.
    – Bernd V.
    Commented Apr 13, 2020 at 11:31
  • I don't have good luck with that plugin, perhaps due to my own misunderstandings of how to use it properly. In your case my first tool to use would be select by location and then check if all your points were selected. If the results didn't look like it worked right I would then try the Topology Checker tool.
    – John
    Commented Apr 13, 2020 at 12:19
  • Indeed. the "Must be covered by" rule seems to work exactly like the "Must be covered by end points" Yet the QGIS help seems to state that there's a real difference ... Never get that point Commented Apr 13, 2020 at 13:35

1 Answer 1

2

I can't seem to get Topology Checker to work with points snapped to lines myself (segments or vertices). If you need some kind of interim solution as an answer, another approach would be to use Virtual Layers as @Bernd V. suggested.

Go to Layer > Add Layer > Add/Edit Virtual Layer and then use a query like the one below, but replace pointsand lines with the names of your layers respectively (if there are spaces in the layer name you need to use double quotes around the name).

SELECT p.* 
FROM 
points p JOIN 
(SELECT collect(l.geometry) AS geometry FROM lines l) lc ON 
disjoint(p.geometry,lc.geometry)

The Virtual Layer will then show only the points that don't intersect (you can style it any way you want to make it obvious). You can mostly leave the Virtual Layer off and then make it visible every time you need to check your data.

Virtual layer off:

enter image description here

Virtual layer on - red diamonds:

enter image description here

Notice the topmost diamond to the left - it looked as if it intersected in the top image but if you zoomed it didn't (it was not snapped). If you wish to add a bit of tolerance you can change the last line of the above query to disjoint(buffer(p.geometry,0.1),lc.geometry) to allow for e.g. 0.1m tolerance.

Virtual layer on - 0.1m tolerance:

enter image description here

If you have a very large dataset or a lower spec computer, though, it might be slow (as it recalculates upon every canvas redraw) and you may be better off investigating other options.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.