Hot answers tagged

7 votes
Accepted

Setting QgsVectorLayer created from CSV in editing mode with PyQGIS

A delimited text layer is not editable in QGIS by default. You have to export it as a spatial format like GeoPackage, ShapeFile etc. You can check what capabilities a layer has using the ...
Kadir Şahbaz's user avatar
7 votes
Accepted

Editing the coding of QGIS plugin

Navigate to Plugin folder (Settings > User Profiles > Open Active Profile Folder). Go to python/plugins/ImportPhotos folder. Open ImportPhotos.py file. Find rel_path = self.selected_folder + os....
Kadir Şahbaz's user avatar
7 votes
Accepted

Merging values from two fields into third field using PyQGIS

You can use or like this, i think it is called Ternary operators: layer = iface.activeLayer() p = layer.dataProvider() field_to_update = "field3" fieldindex = layer.fields().indexOf(...
BERA's user avatar
  • 71.4k
5 votes

Creating ring using overlapping and fully contained polygon in QGIS

Select your polygon which must be edited: editable polygon is already selected in the picture Edit-> Edit Geometry -> Add Ring Make sure that the snapping option is switched on Snapping ...
KVO's user avatar
  • 366
5 votes

Is there a way of preventing QGIS from becoming buggy during a long editing session?

While I do not recognize/experience the specific issues you are experiencing, some thoughts: Make sure you are running the latest version. At the time of your question (and this answer), the current ...
Houska's user avatar
  • 7,978
4 votes
Accepted

Moving individual polygons in QGIS

Make sure the polygon layer is in Editing mode (use the Toggle Editing button on the Digitzing Toolbar, or Layer->Toggle Editing). Then select the Move Feature tool from the Advanced Digitizing ...
Tom Brennan's user avatar
  • 4,652
4 votes

Disabling warning that scratch layer isn't saved in QGIS Plugin

I was able to use this code for desired results: from qgis.core import QgsSettings settings = QgsSettings() settings.setValue('app/askToSaveMemoryLayers', False) Tested: QGIS 3.24 - 6/15/23
Pepik's user avatar
  • 162
4 votes

Tracing tool missing in QGIS 3.28.4

it is still there (QGIS 3.28.4, Windows 11)
eurojam's user avatar
  • 10.7k
4 votes

Saving all layer edits at once in QGIS

Under the Digitizing Toolbar, there is an option to save edits for all layers. It will be active once you edit a feature or features of any layer loaded in the project. If the Digitizing Toolbar is ...
ahmadhanb's user avatar
  • 40.7k
3 votes

Creating ring using overlapping and fully contained polygon in QGIS

Having both input polygons on the same layer, you can use the function overlay_contains() to identify polygons that are completely contained within other ones and create the difference between the ...
Babel's user avatar
  • 70.6k
3 votes

Creating ring using overlapping and fully contained polygon in QGIS

I am not aware of a native QGIS Processing Tool that does what you are looking for. But some time ago, I wrote a processing script for this. "Conditional Difference" is part of the ProcessX-...
MrXsquared's user avatar
  • 33.9k
2 votes
Accepted

Moving a point a specified distance and bearing in QGIS

You can use "Move feature" in the "Advanced Digitizing" toolbar. See https://docs.qgis.org/latest/en/docs/user_manual/working_with_vector/editing_geometry_attributes.html#move-...
Houska's user avatar
  • 7,978
2 votes

Coordinates format in ArcGIS Pro

While the decimal value does not display, it is accounted for. Using ArcGIS Pro 3.1.2, I have a point at the following location: If I use the Move To tool and add .1 to my seconds values, the point ...
evv_gis's user avatar
  • 3,200
2 votes

Changing attributes of a newly created feature in Python form init code

If you add a print statement in on_ok to check the feature.id() you will probably find that it is wildly different to what you expect. I was able to get the correct feature id by querying the ...
Matt's user avatar
  • 16.3k
2 votes
Accepted

Reshape a feature by tracing another edge without using topology in ArcGIS Pro

Isn't it "reShape" under "Tools" in the "Edit" menu? After selecting a feature, you can change its shape by tracing in ArcMap in the same way by selecting the trace tool ...
origami's user avatar
  • 36
1 vote
Accepted

Syncing ArcGIS Pro and ArcGIS Online

To edit ArcGIS Online hosted feature services directly in ArcGIS Pro, open the catalog pane and click on Portal at the top. You will then see all data you are the owner of under My Content and things ...
lambertj's user avatar
  • 3,037
1 vote
Accepted

Changing attributes of a newly created feature in Python form init code

A minimal solution, based on @Matt's great answer: from functools import partial from qgis.PyQt.QtWidgets import QPushButton, QSpinBox def on_ok(layer, feature, spinbox): value = spinbox.value() ...
bugmenot123's user avatar
  • 10.8k
1 vote
Accepted

Move feature with a mouse without using the Editor widget?

You can move features without the Editor widget, using it's underlying "sketch" functionality. The Sketch widget provides a simple UI for creating and updating graphics, but in your case you'...
Bjorn Svensson's user avatar
1 vote

Editing in QGIS vertex tool

Below the help text from the "Extract vertices" tool : This algorithm takes a line or polygon layer and generates a point layer with points representing the vertices in the input lines or ...
J.R's user avatar
  • 15.8k
1 vote
Accepted

Toggle editing does not work for Digitizing forms in QGIS

If you are referring to the "Shape Digitizing Toolbar" it will only activate if : You are currently editing a Line or Polygon layer (it can't work with point so it won't activate with point ...
J.R's user avatar
  • 15.8k
1 vote
Accepted

PostGIS ST_Overlap does not allow attribute editing

Ok, quite embarrassing. I was experiencing the exact same problem discussed in the thread I was referencing above! I did not implement the ID check in the constraint correctly which exactly caused ...
KoGIS's user avatar
  • 33
1 vote

Georeferencing Polygon Features using ArcGIS Pro

The vector equivalent to georeferencing of raster data is spatial adjustment. To do that in ArcGIS Pro see Is the Spatial Adjustment toolbar available in ArcGIS Pro?. That FAQ refers you to the ...
PolyGeo's user avatar
  • 65.1k
1 vote

Merging values from two fields into third field using PyQGIS

Another approach might be not as Pythonic as was suggested by @BERA, however, it is still applicable in terms of PyQGIS. It utilizes the coalesce() function inside the QgsExpression() class. Proceed ...
Taras's user avatar
  • 32.8k
1 vote

Freehand Editing 3 polygons not showing up

Since QGIS 3.20, you don't need a plugin. When digitizing, simply click R or the Stream Digitizing icon in the Digitizing Toolbar. QGIS documentation says: Stream Digitizing: draws lines in freehand ...
Babel's user avatar
  • 70.6k
1 vote

Deleting GeoTIFF Header/Spatial Reference data using open source software

I think that gdal_edit https://gdal.org/programs/gdal_edit.html can do what you want with the -unsetgt option -unsetgt Remove the georeference information. This tool edits the metadata in-place ...
user30184's user avatar
  • 64.7k
1 vote
Accepted

PyQGIS - modify Z-values for Polyline

I managed to achieve the desired outcome via a roundabout method: Iterating through the points of the original geometry of each feature Creating new Points, and setting the X, Y and Z values manually ...
Tom Brennan's user avatar
  • 4,652
1 vote

"The operation would change the geometry type"

I receive the same warning when editing multi-polygon features on a Spatial Lite layer. I am able to work around it by either modifying the vertices manually in the Vertex Editor, or using the Reshape ...
pwflint's user avatar
  • 11
1 vote

How to have anonymous users edit Survey 123 data in a form

This can be done in an ArcGIS Dashboard. Add the embedded Survey123, the web map, and a pick list to a dashboard. Link the Pick List to the map and Survey123 via the GlobalID. Here is how to link them....
LoveAngel's user avatar
1 vote

How do I edit multiple features at one time?

You can do this in modern QGIS if you use the Vertex Editor. To move existing vertices, select them by dragging a rectangle mouse selection over them, then move them. To introduce new vertices, select ...
bugmenot123's user avatar
  • 10.8k
1 vote

Modifying DEM elevation data in QGIS using a polygon

QGIS Version 3.x update Building upon Ed Rollason's excellent answer (which used to work with QGIS 2.x, and is unfortunately not applicable on QGIS 3.x any londer), one now needs to use Rasterize (...
RafDouglas C. Tommasi's user avatar

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