As of May 31, 2023, we have updated our Code of Conduct.
15 votes

Is the erratum about polygon point order in GeoJSON correct?

There are TWO "right hand rules" (well, scores, if not hundreds, but the direction of magnetic force induced on a positive charge isn't relevant to this discussion). One asserts that vertices be ...
Vince's user avatar
  • 19.7k
13 votes
Accepted

Changing drawing priority for selected feature in QGIS

You can change drawing order for the selected features using Symbology tab in Layer Properties. Open Symbology tab in Layer Properties or Layer Styling (F7). Check Control feature rendering order. ...
Kadir Şahbaz's user avatar
11 votes
Accepted

Removing green Xs and red lines in QGIS

You are in the middle of editing or creating a new line feature. If you toggle the layer visibility you still see the half-created feature, and if you toggle editing off in that layer you'll still see ...
Spacedman's user avatar
  • 59.3k
11 votes
Accepted

Selecting features that do not touch other features in same layer in QGIS

You can use the function overlay_disjoint() (see documentation): overlay_disjoint(@layer) via "Select by expression" (see documentation) to select the features. Then you can delete them or ...
MrXsquared's user avatar
  • 31.2k
10 votes
Accepted

Intersection postgis TopologyException

I just had a similar problem, and the solution is the following: You have many queries, so the first question is which one of them fails. I'd suggest bisecting the entire SQL query to find where the ...
culebrón's user avatar
  • 2,314
10 votes
Accepted

Where does PostGIS store its topology tables?

Topology functions are stored in the topology schema, topology data (edges, faces, nodes, relations) are stored in a user-defined schema, and relations (topo id, layer id, element id, element type) ...
katahdin's user avatar
  • 2,514
10 votes
Accepted

Can a shapefile have polygons that overlap each other?

Yes - there is no restriction on the actual shapes or positions of the polygons in a shapefile. The only real restriction is that you can't mix geometry types in a shapefile (so no points & ...
Ian Turton's user avatar
  • 79k
10 votes

Solving topological errors like invalid geometries in QGIS?

The most successful way I've ever had of correcting topological errors in QGIS is actually to use GRASS. You can either: run v.clean from the processing toolbox (manual here https://grass.osgeo.org/...
Ed Rollason's user avatar
  • 3,808
10 votes
Accepted

How can I enable topological editing in QGIS 3

In QGIS 3.4 you may need to enable Snapping toolbar by right-click the main menu bar and select Snapping toolbar, and you will find this menu: The last three icons are Enable Topological Editing, ...
ahmadhanb's user avatar
  • 39.6k
9 votes

How to remove spikes in Polygons with PostGIS

Here is a link to my PL/pgSQL function which does exactly what the OP is asking for: removing spikes from polygons and linestrings. Here you can download it and read the documentation: PostGIS ...
Eggplant's user avatar
  • 219
9 votes
Accepted

Finding four states each of six pairs of which have common boundary using PostGIS?

Here's an attempt with postgis. i've used data imported from natural earth data, admin level 1, 1:10m scale. This will take a long time as it's a 4-way cartesian join with st_relate(). The magic ...
Steven Kay's user avatar
  • 20.2k
9 votes
Accepted

Export topology checker results as table/shapefile in QGIS

Here is a bit of a hack I came up with which should do what you want. With the Topology Checker dock widget open and the table populated with some errors, open the Python console, paste the following ...
Ben W's user avatar
  • 19.2k
9 votes

Topological editing of vertices that are common in two adjacent polygons in QGIS

Once in edit mode, select the vertex tool, then on the snapping toolbar, select enable topological editing and at last left-click once on the shared vertex, move them, click a 2nd time to set the new ...
JGH's user avatar
  • 38.3k
9 votes

Select polygons within polygons in same layer

To SELECT those that are within others (courtyards): SELECT a.* FROM <buildings> AS a WHERE EXISTS ( SELECT 1 FROM <buildings> AS b WHERE a.<id> <> b.<id> ...
geozelot's user avatar
  • 28k
8 votes

Dragging all vertices at a given point programmatically in PyQGIS

This can be done using QGIS tools that you can enable programmatically. That is, there is no need to reinvent the wheel. Namely, you need to: Click on the Enable Topological Editing button in the ...
Germán Carrillo's user avatar
8 votes
Accepted

PostGIS check if multiline string is included in polygon

It seems "included" here means intersects, rather than true containment; you want to run SELECT nw.* FROM "NeighbourhoodWatch" AS nw JOIN gis_streets AS gs ON ST_Intersects(...
geozelot's user avatar
  • 28k
7 votes

PostGIS Topology Requires Admin

The set of SQL commands that were needed for PostGIS 2.2.1: create extension postgis_topology; grant usage on schema topology to dbuser; grant all on all tables in schema topology to dbuser; grant ...
anneb's user avatar
  • 1,281
7 votes
Accepted

What's difference between Topology and Check Validity in QGIS?

Topology means "the rules and behaviors that model how points, lines, and polygons share coincident geometry." (Source.) These rules can apply specifically to geometry and how it is stored, or be ...
Chris W's user avatar
  • 15.6k
7 votes
Accepted

Create polygon from lines in PostGIS

I got this working by using ST_Node first, in conjunction with ST_Collect, to convert the lines into a set of noded linestrings within a MultiLinestring. As it says in the docs for ST_Node: Fully ...
John Powell's user avatar
  • 13.5k
7 votes

Redistributing duplicated points inside the polygon

If you have a PostgreSQL BD with PostGIS, you can do the following query : SELECT a.*, ST_GeneratePoints(b.geom, 1, floor(random() * 5000 + 1)::int) AS new_address_geom FROM addresses a, ...
J. Monticolo's user avatar
  • 15.1k
7 votes
Accepted

Select polygons within polygons in same layer

Use "Select by expression" with overlay_within(@layer).
LM10's user avatar
  • 436
6 votes

Remove pseudo nodes in QGIS

Some options for pseudo-node removal with QGIS version 2.18: QGIS Dissolve will remove pseudo-nodes in a line data set. It creates multi-lines. By running QGIS Multipart to Singleparts, one gets ...
Håvard Tveite's user avatar
6 votes
Accepted

How can I remove the gap between two polygon boundaries in QGIS?

If the number of polygons is relatively smaller and you prefer to keep the more detailed boundary I would probably make it semi-automatic way as following: remove the overlaps of less detailed ...
Miro's user avatar
  • 9,546
6 votes
Accepted

What is nontopological geometry?

I would not apply the term "non-topological" to a geometry. Basically, the shape of a geometry can be modified without affecting its topology, but this does not imply that you do not modify the shape ...
radouxju's user avatar
  • 49.3k
6 votes

Errors when using QGIS Topology Checker with must not overlap rule

When the topology checker highlights a feature in red, it means that feature violates one of the rules. Since your only rule is "must not overlap," when a polygon is red it means that polygon ...
csk's user avatar
  • 24.1k
6 votes
Accepted

Making vector geometries "Kiss" in QGIS

A better method to simplify is using the GRASS tool v.generalize from Menu Processing / Toolbox. It keeps topology intact, thus no need to fill sliver polygons. I' m not sure if you only have gaps - ...
Babel's user avatar
  • 60.6k
6 votes
Accepted

Unique attribute value across multiple layers

You might want to consider generating a UUID field for every table. QGIS supports GeoPackages, which are based on SQLite. There are discussions over at SO for how to generate SQLite UUID fields. See ...
Encomium's user avatar
  • 2,982
6 votes
Accepted

Redistributing duplicated points inside the polygon

Here is how you can do this using a PyQGIS script. Open the Python-Console, copy paste the code, change your settings at the top of the code and hit run. You can also cancel the execution via QGIS-...
MrXsquared's user avatar
  • 31.2k
6 votes
Accepted

Allow overlapping polygons in QGIS

Look at the panel "snapping toolbar"
Christophe P.'s user avatar
5 votes
Accepted

Grass Processing tools via QGIS : v.clean snap, chdangle, and rmdangle

Sometimes it's easier to understand something with the help of graphic or images. This post explains how to clean topology error with GRASS v.clean tool with some images and explanation about the ...
user104406's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible