I have a dataset with 2000+ feature based on addresses. I need to zoom to each point individually and move them a little (no consistent shift so no other way to do it).

Selecting the next feature in the attribute table and hitting the "zoom to selected" is a bit tidious. Is there a way (or python script) to assign a hotkey which automatically selects and zooms to next feature?

  • based on which criteria are you shifting the points?
    – Nightwatch
    Jul 17 '17 at 11:04
  • @Nightwatch points were plotted based on an adress. Since points are churches that usually don't have an adress the actual locations are in the vicinity but not with a certain shift (e.g. as a result of a reprojection). Only way to do it is to manually look at each point and move it to the location where google street or OSM human show the church icon. What I want is to switch from "church vicitinity" to church vicinity in my map view quicker. Jul 17 '17 at 11:49
  • 1
    Have you thought about a different approach to your problem? Maybe querying osm point data for churches and snapping your points to the osm points?
    – Nightwatch
    Jul 17 '17 at 13:01
  • @Nightwatch that would indeed be the better option. Any idea how I could do this querry'ing? I had a quick look at it before I started but noted the Google Maps engine connector for QGIS is not issuing any more free accounts? I will add a screenshot to give you an idea what I need to do. Jul 17 '17 at 15:22
  • 1
    download.geofabrik.de/europe/belgium-latest-free.shp.zip German OSM provider. Don't worry, names are belgian. you are interrested in "gis.osm_pofw_free_1.shp" and "gis.osm_pofw_a_free_1.shp" pofw = place of worship
    – Nightwatch
    Jul 17 '17 at 18:13

This can be done by creating a plugin using plugin builder, add zoom to next feature with python pyqgis logic, and configuring shortcut setting, see instructions below:

  1. Create plugin using QGIS Plugin Builder (plugin) to create a regular "tool button with dialog" plugin
  2. In the yourPluginName.py (located at, C:\Users\yourUserName.qgis2\python\plugins\yourPluginName), open the yourPluginName.py (in Notepad or better Notepad++) and comment all lines within the def run(self): function
  3. Add python zoom to next feature logic within the def run(self): function (you will have to do some research on how to do this, if you get stuck post another question on this forum with your code attempt and provide where you are stuck)
  4. Finally, within QGIS>Settings>Configure Shortcuts... option browse down until you find this plugin name and define a key board key as the shortcut

This will allow you to by pass clicking on the plugin button and just call it from clicking the shortcut key.

  • Thank you artwork! I will have a look at the different PyGis scripts out there and try building my first plugin. Jul 17 '17 at 15:18
  • @HannesLedegen Did you build one? I'd like the same thing and would like to see if you were successful.
    – brink
    Nov 23 '17 at 0:28
  • @brink, sadly I coudn't find the time to build one.I would love to help test it though should you attempt to build one yourself. Nov 27 '17 at 9:30
  • @HannesLedegen I'll give it a shot but I know almost nothing about coding in python or building a plugin. I've seen it requested a few times and I'm surprised nobody has built one. It's at that point where I am wondering if it would be faster to attempt to build it or just do the work with the tools available.
    – brink
    Nov 27 '17 at 17:56
  • Here's a fairly simple answer without building a plugin. gis.stackexchange.com/questions/133189/…
    – brink
    Nov 27 '17 at 20:08

I had the same issue and came upon this wonderful plugin: https://plugins.qgis.org/plugins/go2nextfeature/

  • 1
    doesn't work in QGIS 3.9 :-( Oct 23 '19 at 16:55
  • Tested with 3.14.16-Pi - it works! Oct 15 '20 at 4:38

In QGIS 3.10 you can now setup a keyboard shortcut to Edit previous/next feature in attribute table. In my system it is set to Ctrl+Alt+[ and Ctrl+Alt+] respectively by default.

See also this answer to a very similar question for how to do the same using the graphical interface.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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