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 ...
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.
...
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 ...
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 ...
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 ...
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) ...
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 & ...
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/...
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, ...
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 ...
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 ...
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 ...
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 ...
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>
...
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 ...
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(...
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 ...
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 ...
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 ...
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,
...
7
votes
Accepted
Select polygons within polygons in same layer
Use "Select by expression" with overlay_within(@layer).
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 ...
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 ...
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 ...
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 ...
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 - ...
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 ...
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-...
6
votes
Accepted
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
topology × 546qgis × 158
arcgis-desktop × 145
postgis × 77
polygon × 48
arcmap × 45
grass-gis × 36
geometry × 30
arcpy × 29
arcgis-10.0 × 27
editing × 25
overlapping-features × 21
python × 19
line × 19
network × 19
postgresql × 18
snapping × 18
arcgis-10.1 × 17
arcgis-pro × 17
arcobjects × 16
shapefile × 15
pgrouting × 15
intersection × 14
arcgis-10.2 × 12
vertices × 12