Selecting features with field not contained in all records of another field using QGIS?Split vector layer by field nameHow to display data from a feature?How to use the replace string function in Field Calculator?QGIS select features from attribute table using the “LIKE” operatorExport DXF from QGIS; points' metadata as text elementGetting the maximum value of a vector field per each unique value of another vector field using PyQGIS?Retrieve value from another layer by field calculatorSelecting features intersecting a selection from another layer in QGISSelecting all features except one using QGIS?How to display an attribute value from a related layer in Atlas?
The use of multiple foreign keys on same column in SQL Server
What defenses are there against being summoned by the Gate spell?
Do VLANs within a subnet need to have their own subnet for router on a stick?
Adding span tags within wp_list_pages list items
How old can references or sources in a thesis be?
Why not use SQL instead of GraphQL?
String Manipulation Interpreter
How can bays and straits be determined in a procedurally generated map?
What do three bars across the stem of a note mean?
Accidentally leaked the solution to an assignment, what to do now? (I'm the prof)
Do I have a twin with permutated remainders?
TGV timetables / schedules?
Can a Warlock become Neutral Good?
What is the offset in a seaplane's hull?
Why can't I see bouncing of a switch on an oscilloscope?
What does it mean to describe someone as a butt steak?
What would happen to a modern skyscraper if it rains micro blackholes?
What's the output of a record cartridge playing an out-of-speed record
Pattern match does not work in bash script
Fencing style for blades that can attack from a distance
Can divisibility rules for digits be generalized to sum of digits
How does strength of boric acid solution increase in presence of salicylic acid?
Can an x86 CPU running in real mode be considered to be basically an 8086 CPU?
Why doesn't H₄O²⁺ exist?
Selecting features with field not contained in all records of another field using QGIS?
Split vector layer by field nameHow to display data from a feature?How to use the replace string function in Field Calculator?QGIS select features from attribute table using the “LIKE” operatorExport DXF from QGIS; points' metadata as text elementGetting the maximum value of a vector field per each unique value of another vector field using PyQGIS?Retrieve value from another layer by field calculatorSelecting features intersecting a selection from another layer in QGISSelecting all features except one using QGIS?How to display an attribute value from a related layer in Atlas?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am quite new to QGIS 3.4.4 and it is complicated at times to get the proper thinking style.
I want to shift the location of some points in my vector layer.
I have a vector layer with points of waterbodies ("waterpoints") with a unique identifier field OBJECTID. I have another vector layer with some points which I relocated on the field. They have a field "Name" which refers to the OBJECTID.
I thought if I can delete all the original points whose "OBJECTID" is contained in "Name" of the other layer and thereafter merge the layers I would be fine. But I can´t make a selection or an export which can check that.
First I didn't manage to get the field from another layer, so I just merged them to run the expression within one layer.
I tried:
OBJECTID IN (Name)
but it does not work...
I really don´t know how to proceed.
I would like to know how to properly write this expression or if there is an alternative method for relocating those points.
qgis
New contributor
add a comment |
I am quite new to QGIS 3.4.4 and it is complicated at times to get the proper thinking style.
I want to shift the location of some points in my vector layer.
I have a vector layer with points of waterbodies ("waterpoints") with a unique identifier field OBJECTID. I have another vector layer with some points which I relocated on the field. They have a field "Name" which refers to the OBJECTID.
I thought if I can delete all the original points whose "OBJECTID" is contained in "Name" of the other layer and thereafter merge the layers I would be fine. But I can´t make a selection or an export which can check that.
First I didn't manage to get the field from another layer, so I just merged them to run the expression within one layer.
I tried:
OBJECTID IN (Name)
but it does not work...
I really don´t know how to proceed.
I would like to know how to properly write this expression or if there is an alternative method for relocating those points.
qgis
New contributor
add a comment |
I am quite new to QGIS 3.4.4 and it is complicated at times to get the proper thinking style.
I want to shift the location of some points in my vector layer.
I have a vector layer with points of waterbodies ("waterpoints") with a unique identifier field OBJECTID. I have another vector layer with some points which I relocated on the field. They have a field "Name" which refers to the OBJECTID.
I thought if I can delete all the original points whose "OBJECTID" is contained in "Name" of the other layer and thereafter merge the layers I would be fine. But I can´t make a selection or an export which can check that.
First I didn't manage to get the field from another layer, so I just merged them to run the expression within one layer.
I tried:
OBJECTID IN (Name)
but it does not work...
I really don´t know how to proceed.
I would like to know how to properly write this expression or if there is an alternative method for relocating those points.
qgis
New contributor
I am quite new to QGIS 3.4.4 and it is complicated at times to get the proper thinking style.
I want to shift the location of some points in my vector layer.
I have a vector layer with points of waterbodies ("waterpoints") with a unique identifier field OBJECTID. I have another vector layer with some points which I relocated on the field. They have a field "Name" which refers to the OBJECTID.
I thought if I can delete all the original points whose "OBJECTID" is contained in "Name" of the other layer and thereafter merge the layers I would be fine. But I can´t make a selection or an export which can check that.
First I didn't manage to get the field from another layer, so I just merged them to run the expression within one layer.
I tried:
OBJECTID IN (Name)
but it does not work...
I really don´t know how to proceed.
I would like to know how to properly write this expression or if there is an alternative method for relocating those points.
qgis
qgis
New contributor
New contributor
edited Apr 2 at 21:42
PolyGeo♦
53.9k1781245
53.9k1781245
New contributor
asked Apr 2 at 15:29
Ferran FFerran F
62
62
New contributor
New contributor
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
You don't mention the QGIS version, but I will assume the newest one. In QGIS 3.6 in Processing you will find Remove duplicates by attribute algorithm. Link to visual change log
You would first want to merge the two layers. Then you can run this algorithm to remove the duplicates.
– csk
Apr 2 at 16:00
add a comment |
If you are using Select by expression, try the following in your waterpoints layer to select features where the "OBJECTID"
value is found in the "NAME"
field of the other layer. Let's assume your other layer is called newlayer
.
get_feature('newlayer','NAME',"objectid") IS NOT NULL
This will check the column NAME
in the layer newlayer
, using the "OBJECTID"
values from your current (=waterpoints) layer.
Please note the name of the other layer and its column are in single quotes and this is case-sensitive.
If it returns a feature (IS NOT NULL
) then there is a match and these features will be selected. You can then delete these features.
You can also use the above expression in the field calculator, too, to generate a new column in your waterpoints layer (let's call it dups
) which will return 1
if there is a match and 0
if there isn't. And delete all the features where there is a match ("dups" = 1
).
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "79"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Ferran F is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f317520%2fselecting-features-with-field-not-contained-in-all-records-of-another-field-usin%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You don't mention the QGIS version, but I will assume the newest one. In QGIS 3.6 in Processing you will find Remove duplicates by attribute algorithm. Link to visual change log
You would first want to merge the two layers. Then you can run this algorithm to remove the duplicates.
– csk
Apr 2 at 16:00
add a comment |
You don't mention the QGIS version, but I will assume the newest one. In QGIS 3.6 in Processing you will find Remove duplicates by attribute algorithm. Link to visual change log
You would first want to merge the two layers. Then you can run this algorithm to remove the duplicates.
– csk
Apr 2 at 16:00
add a comment |
You don't mention the QGIS version, but I will assume the newest one. In QGIS 3.6 in Processing you will find Remove duplicates by attribute algorithm. Link to visual change log
You don't mention the QGIS version, but I will assume the newest one. In QGIS 3.6 in Processing you will find Remove duplicates by attribute algorithm. Link to visual change log
answered Apr 2 at 15:44
GSienkoGSienko
12113
12113
You would first want to merge the two layers. Then you can run this algorithm to remove the duplicates.
– csk
Apr 2 at 16:00
add a comment |
You would first want to merge the two layers. Then you can run this algorithm to remove the duplicates.
– csk
Apr 2 at 16:00
You would first want to merge the two layers. Then you can run this algorithm to remove the duplicates.
– csk
Apr 2 at 16:00
You would first want to merge the two layers. Then you can run this algorithm to remove the duplicates.
– csk
Apr 2 at 16:00
add a comment |
If you are using Select by expression, try the following in your waterpoints layer to select features where the "OBJECTID"
value is found in the "NAME"
field of the other layer. Let's assume your other layer is called newlayer
.
get_feature('newlayer','NAME',"objectid") IS NOT NULL
This will check the column NAME
in the layer newlayer
, using the "OBJECTID"
values from your current (=waterpoints) layer.
Please note the name of the other layer and its column are in single quotes and this is case-sensitive.
If it returns a feature (IS NOT NULL
) then there is a match and these features will be selected. You can then delete these features.
You can also use the above expression in the field calculator, too, to generate a new column in your waterpoints layer (let's call it dups
) which will return 1
if there is a match and 0
if there isn't. And delete all the features where there is a match ("dups" = 1
).
add a comment |
If you are using Select by expression, try the following in your waterpoints layer to select features where the "OBJECTID"
value is found in the "NAME"
field of the other layer. Let's assume your other layer is called newlayer
.
get_feature('newlayer','NAME',"objectid") IS NOT NULL
This will check the column NAME
in the layer newlayer
, using the "OBJECTID"
values from your current (=waterpoints) layer.
Please note the name of the other layer and its column are in single quotes and this is case-sensitive.
If it returns a feature (IS NOT NULL
) then there is a match and these features will be selected. You can then delete these features.
You can also use the above expression in the field calculator, too, to generate a new column in your waterpoints layer (let's call it dups
) which will return 1
if there is a match and 0
if there isn't. And delete all the features where there is a match ("dups" = 1
).
add a comment |
If you are using Select by expression, try the following in your waterpoints layer to select features where the "OBJECTID"
value is found in the "NAME"
field of the other layer. Let's assume your other layer is called newlayer
.
get_feature('newlayer','NAME',"objectid") IS NOT NULL
This will check the column NAME
in the layer newlayer
, using the "OBJECTID"
values from your current (=waterpoints) layer.
Please note the name of the other layer and its column are in single quotes and this is case-sensitive.
If it returns a feature (IS NOT NULL
) then there is a match and these features will be selected. You can then delete these features.
You can also use the above expression in the field calculator, too, to generate a new column in your waterpoints layer (let's call it dups
) which will return 1
if there is a match and 0
if there isn't. And delete all the features where there is a match ("dups" = 1
).
If you are using Select by expression, try the following in your waterpoints layer to select features where the "OBJECTID"
value is found in the "NAME"
field of the other layer. Let's assume your other layer is called newlayer
.
get_feature('newlayer','NAME',"objectid") IS NOT NULL
This will check the column NAME
in the layer newlayer
, using the "OBJECTID"
values from your current (=waterpoints) layer.
Please note the name of the other layer and its column are in single quotes and this is case-sensitive.
If it returns a feature (IS NOT NULL
) then there is a match and these features will be selected. You can then delete these features.
You can also use the above expression in the field calculator, too, to generate a new column in your waterpoints layer (let's call it dups
) which will return 1
if there is a match and 0
if there isn't. And delete all the features where there is a match ("dups" = 1
).
answered Apr 3 at 2:27
she_weedsshe_weeds
1,414315
1,414315
add a comment |
add a comment |
Ferran F is a new contributor. Be nice, and check out our Code of Conduct.
Ferran F is a new contributor. Be nice, and check out our Code of Conduct.
Ferran F is a new contributor. Be nice, and check out our Code of Conduct.
Ferran F is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Geographic Information Systems Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f317520%2fselecting-features-with-field-not-contained-in-all-records-of-another-field-usin%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown