[Qgis-user] Reselect Features

Richard McDonnell richard.mcdonnell at opw.ie
Fri Nov 17 03:51:08 PST 2023


Michael,
In addition to what Nyall said, might I suggest another possible method for you doing it.

Instead of selecting and deselecting, how about you use a virtual field? To sort/filter the river names.
1)      Using the field calculator, create a virtual field and call it, "filter" and set all values to 1 or 0, based on something like... CASE WHEN river_name = 'SomeRiverName' THEN  1 ELSE 0 END (expression may have some errors)
2)      Style your Layer using the "filter" value as your classification and set 0 as Invalid and 1 as Valid.

You should then be able to see only the geometries with the valid name and spot the gaps.
If instead of selecting and deselecting, you use the filter column to edit the filter attribute to 1 or 0 you can add or remove features until you have what you want. You can also set the attribute table to display only what is visible on canvas, which may also help.
Hopefully the above helps
Kind Regards,

Richard




——
Richard McDonnell MSc GIS, FME Certified Professional
FRM Data Management

——
Oifig na nOibreacha Poiblí
Office of Public Works

Sráid Jonathan Swift, Baile Átha Troim, Co na Mí, C15 NX36
Jonathan Swift Street, Trim, Co Meath, C15 NX36
——
M +353 87 688 5964   T +353 46 942 2409
https://gov.ie/opw

——
To send me files larger than 30MB, please use the link below https://filetransfer.opw.ie/filedrop/richard.mcdonnell@opw.ie

Email Disclaimer: https://www.gov.ie/en/organisation-information/439daf-email-disclaimer/



——
Richard McDonnell MSc GIS, FME Certified Professional
FRM Data Management

——
Oifig na nOibreacha Poiblí
Office of Public Works

Sráid Jonathan Swift, Baile Átha Troim, Co na Mí, C15 NX36
Jonathan Swift Street, Trim, Co Meath, C15 NX36
——
M +353 87 688 5964   T +353 46 942 2409
https://www.opw.ie

——
To send me files larger than 30MB, please use the link below https://filetransfer.opw.ie/filedrop/richard.mcdonnell@opw.ie

Email Disclaimer: https://www.opw.ie/en/disclaimer/
> -----Original Message-----
> From: QGIS-User <qgis-user-bounces at lists.osgeo.org> On Behalf Of Michael
> Edward McNeil via QGIS-User
> Sent: 17 November 2023 02:48
> To: Andrea Giudiceandrea <andreaerdna at libero.it>
> Cc: qgis-user at lists.osgeo.org
> Subject: Re: [Qgis-user] Reselect Features
>
> Thank you for your reply, Andrea. I'll be glad to describe the situation and what
> I'm doing.
>
> I'm running Qgis 3.23.3 for Windows (Windows 11), which is the regular
> environment I'm now working Qgis in – though earlier I also tried 3.23.2 on
> MacOS (the latter of which – Qgis for MacOS – I now believe to be a less
> refined and less finished variety of Qgis, similar version number or no).
>
> For my particular project at present (a map I'm preparing of Roman Britain),
> I'm adding rivers to the map – drawing data from a shapefile of the
> "waterways" (rivers, creeks, canals, ditches, etc.) of the island of Britain
> (containing something like 190,000 features!), distributed by the U.K.
> government.
>
> The procedure I've found most convenient at present for doing so (excepting
> the interference of the problem being discussed) is to copy the original
> shapefile to the name of the desired river, load it as a layer, open its Attributes
> Table, turn on Editing, sort the table by name, select all features bearing the
> right river name, then (after selecting the Select Features by Area or Single
> Click tool) scan through the segments and features of the intended river: 1)
> deselecting the segments of a different river possessing the same name (there
> are many such in Britain), 2) deselecting side segments which incorrectly bear
> your intended river's name (also a lot), 3) selecting incorrectly named
> segments (e.g., NULL) that if omitted would introduce gaps in the line of the
> river, 4) adding to the selection creeks possessing a different name, and so
> forth. Finally, invert the selection, delete all the features one didn't select in the
> process above, then save.
>
> It all works well – until the eventual moment when one's pressed shift or
> control key momentarily fails to register, the entire laboriously selected set of
> features clears back to just the last one touched – and I pull out even more of
> my remaining hair.
>
> Nor does saving the layer every now and then in the middle of the process do
> any good – because what features are selected or not at that instant doesn't
> get remembered in the save file.
>
> This is the moment when it would be exceedingly nice if one could just pull
> down Edit > Select > Reselect Features and thereby get back to the last previous
> selected set of features as they existed just prior to the last keystroke/click
> entered.
>
> But that command appears to do nothing.
>
> (Thanks again for your response!)
>
> Best,
> Michael McNeil
>
>
> > On Nov 16, 2023, at 16:33, Andrea Giudiceandrea via QGIS-User <qgis-
> user at lists.osgeo.org> wrote:
> >
> >
> >>
> >> Michael Edward McNeil memcneil02 at gmail.com Thu Nov 16 16:04:37 PST
> >> 2023
> >
> >> Why doesn't the Edit > Select > Reselect Features command work?
> >
> > Hi Michael,
> > it seems to me the command works as expected [1], at least using QGIS 3.28
> on Windows.
> >
> > May you provide a detailed list of steps that lead to such command to not
> work properly?
> >
> > Best regards.
> >
> > Andrea
> >
> > [1]
> > https://docs.qgis.org/3.28/en/docs/user_manual/introduction/general_to
> > ols.html#selecting-manually-on-the-map-canvas
> > _______________________________________________
> > QGIS-User mailing list
> > QGIS-User at lists.osgeo.org
> > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
> _______________________________________________
> QGIS-User mailing list
> QGIS-User at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


More information about the QGIS-User mailing list