32
votes
Unable to snap vertices and segment in QGIS 3.0
In QGIS 3.0, the snapping settings are accessed through the snapping toolbar.
This is a change from previous versions. In QGIS 2.x they were accessed through Options menu > Snapping Options...
...
25
votes
Snapping raster grids in R
This question is similar to: Clip raster by raster with data extraction and resolution change, but coming from a different angle. However, I think the answer is likely the same. First off, choose ...
16
votes
Accepted
How to snap a road network to a hexagonal grid in QGIS?
My solution involves a PyQGIS script that is faster and more effective than a workflow involving snapping (I gave it a try too). Using my algorithm I've obtained these results:
You can run the ...
15
votes
Aligning multiple points to line in QGIS?
There's a built-in tool to do this in the (unreleased) QGIS 3.0 version. You can get a nightly snapshot from the QGIS website to test this in advance.
To do this:
Run the "Snap geometries to layer" ...
15
votes
Snap points shapefile to line shapefile using shapely
The methodology is called linear referencing and a solution was given by Mike T in Coordinate of the closest point on a line with Shapely.
There is also a recipe in the Python Geospatial Analysis ...
15
votes
Snapping a point to a unique hexagon in QGIS
You can try the script below.
Note: Before you do anything else, please make a backup copy of your point layer file in case of unexpected or undesired results (don't just duplicate the layer in the ...
11
votes
Accepted
Split line by nearest points using geopandas
First make sure you union your GeoDataFrames into a MultiLineString and MultiPoint
line = gdf_line.geometry.unary_union
coords = gdf_point.geometry.unary_union
Using shapely.ops.snap and shapely.ops....
10
votes
Accepted
Why is Shapely's snapping (GEO snaps) not working as expected?
The shapely.ops.snap function snaps to the vertices of geometries only.
See the illustration below. On the left, the red vertex is within the snapping tolerance to the blue vertex, so it will snap. ...
10
votes
How to edit geometry of multiple layers simultaneously in QGIS 3?
(QGIS 3.4.1) Make sure all layers you want to edit have editing toggled on.
Using the vertex tool in the digitizing toolbar, ensuring the option for 'All layers' is selected from the dropdown next to ...
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, ...
10
votes
Accepted
Highlighting snapping position in PyQGIS
Add the following lines to __init__ method:
self.snapIndicator = QgsSnapIndicator(canvas)
self.snapper = self.canvas.snappingUtils()
And add a canvasMoveEvent method like this:
def canvasMoveEvent(...
9
votes
Accepted
How do I create a target geometry to use with JTS GeometrySnapper?
For this scenario, I would suggest using the JTS GeometryPrecisionReducer class rather than GeometrySnapper. GeometrySnapper is intended for snapping one geometry to another. If you wanted to use ...
9
votes
Snapping a point to a unique hexagon in QGIS
You can use the following script. It creates a new layer for the relocated points.
# h: hexagon, p: point
h_lyr = QgsProject.instance().mapLayersByName("Hexagons")[0]
p_lyr = QgsProject....
8
votes
Snapping function doesn't work with complex polygons in QGIS?
With reference to the error you get, it seems that some geometries are invalid (in this case, the lake layer). You may check it by running several tools, for example the Check validity algorithm from ...
8
votes
Accepted
8
votes
Snapping to segments not working in QGIS
To get the snap to vertices to work make sure you have the following options selected:
Enable Snapping (U magnet button)
Enable topological editing
Enable snapping on intersection
Enable tracing
Make ...
7
votes
Enabling "Snapping" in QGIS while drawing polygons?
Note that in the latest QGIS release snapping options is no longer visible by default. To use it right-click settings to activate snapping options.
7
votes
Aligning multiple points to line in QGIS?
This can be afforded with PyQGIS. For next situation:
following code, considering a tolerance of 5 map units, was ran at the Python Console of QGIS:
from math import sqrt
registry = ...
6
votes
Removing small spaces (slivers) between polygons
There is an "Eliminate sliver polygons" function in QGIS 2.12 (Lyon) Toolbox. I am sure it is also in some earlier version.
6
votes
How to snap a road network to a hexagonal grid in QGIS?
I did it in ArcGIS, surely can be implemented using QGIS or simply python with package capable of reading geometries.
Make sure that roads represent network, i.e. intersect each other at the ends only....
6
votes
Is there any option in QGIS to draw parallel lines that snap on the outside part of the line (adjacent lines) that are independent from scale?
Not sure this is what you are really after, but you can use a single line with a different symbolisation to create the appearance of two parallel lines.
Starting with a 1.1 km line in CRS 3857 (...
6
votes
Accepted
Digitizing without gaps in QGIS
The title of your question was misleading. Your issue is more probably about snapping, which is one of the several tools used for digitizing features.
Simply, enable snapping mode from Settings >&...
6
votes
Connect newly drawn lines to existing lines in QGIS?
What you are looking for is doing a snapping operation, which is a very common task in a GIS software.
Simply, go to Settings >> Snapping Options... and set where to apply the snapping and a ...
6
votes
Snapping to sketch' vertices while editing in QGIS?
There is no "snap to sketch" equivalent in QGIS, unfortunately. There are a couple of ways to deal with this situation, but each involve a couple of steps.
Go to View > Toolbars, and enable the Shape ...
6
votes
Accepted
Snapping to a segment of the point symbol (QGIS)
You can achieve this using a virtual layer.
Go to the menu Layer > Add Layer > Add/Edit Virtual Layer... and enter the following query.
select st_buffer(geometry,dist)
from myPointLayer
...
5
votes
Creating new lines along specifically selected existing lines using QGIS?
Tracing is now implemented in Advanced Digitizing Toolbar
The layer(s), you want to snap to, has(ve) to be visible and snapping option has to be turned on. If you want to snap to a certain layer, use ...
5
votes
Snapping while measure in QGIS?
The snapping has moved for QGIS3.
Project 🠊 Snapping Options... to display the Project Snapping Settings toolbar:
Then you need to toggle on the snapping and away you go!
[
5
votes
How to snap lines to nearest point?
In QGIS 3.0 there is a geoprocessing algorithm called 'Snap Geometries to Layer' which works for lines or points (possibly polygons, haven't tested) and has some options on how the algorithm behaves.
...
5
votes
Accepted
Snapping multiple points to nearest edge of polygon using ArcGIS for Desktop?
There is an ArcToolbox tool called Snap found in the "Editing Tools" toolset.
You could use Select by Location to select all the points that don't intersect one of your polygons (the ones that are ...
5
votes
Accepted
Road snapping in R - snapPointsToLine / Projection Problem
The warning message is quite clear here:
1: In RGEOSDistanceFunc(spgeom1, spgeom2, byid, "rgeos_distance") :
Spatial object 1 is not projected; GEOS expects planar coordinates
It requires planar (...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
snapping × 397qgis × 158
arcgis-desktop × 81
qgis-3 × 34
line × 31
postgis × 30
editing × 30
polygon × 27
pyqgis × 26
point × 20
arcgis-10.0 × 18
topology × 18
arcmap × 17
digitizing × 16
python × 14
arcpy × 13
arcgis-pro × 12
geometry × 12
arcgis-10.1 × 11
shapely × 11
vertices × 11
raster × 10
layers × 9
vector × 9
shapefile × 8