Updating two or more fields in QGIS? Planned maintenance scheduled April 23, 2019 at 23:30 UTC...
Drawing spherical mirrors
Central Vacuuming: Is it worth it, and how does it compare to normal vacuuming?
Most bit efficient text communication method?
Crossing US/Canada Border for less than 24 hours
How often does castling occur in grandmaster games?
Is CEO the "profession" with the most psychopaths?
What does this say in Elvish?
Misunderstanding of Sylow theory
Semigroups with no morphisms between them
Strange behavior of Object.defineProperty() in JavaScript
Google .dev domain strangely redirects to https
How did Fremen produce and carry enough thumpers to use Sandworms as de facto Ubers?
How many morphisms from 1 to 1+1 can there be?
How do living politicians protect their readily obtainable signatures from misuse?
Karn the great creator - 'card from outside the game' in sealed
What do you call the main part of a joke?
How can I prevent/balance waiting and turtling as a response to cooldown mechanics
What's the point of the test set?
How could we fake a moon landing now?
What does it mean that physics no longer uses mechanical models to describe phenomena?
As Singapore Airlines (Krisflyer) Gold, can I bring my family into the lounge on a domestic Virgin Australia flight?
Why are vacuum tubes still used in amateur radios?
What is the difference between a "ranged attack" and a "ranged weapon attack"?
How can I set the aperture on my DSLR when it's attached to a telescope instead of a lens?
Updating two or more fields in QGIS?
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?What's the best way to produce a density map from weighted points in QGIS?Can this compilation and display of species frequency data be improved? QGIS 1.8.0Best way to join and handle multiple attributes related to the same featureMultiple display of vector layer in a QGIS plugin interfaceFinding Points in Polygons with Matching ID's?QGIS - updating Processing pluginIs there a way to quickly flip through PostGIS records with several geometry fields?Generating random points inside polygons that capture values from multiple attribute fieldsCreate raster out of overlapping buffers within the same shapefile in QGIS 3.0Automate filling of attribute table using QGIS?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I have 5 layers:
- NAM_USA (It has four fields of our interest, named 'bare', 'sand', 'woody' and 'built' depicting feature counts in each of the below corresponding layers.)
- Baresoil
- Woodyland
- Sandbeach
- Builtup
The process is :
- Jump to a feature(grid) in NAM_USA using go2nextfeature plugin.
- Calculate predefined expressions on NAM_USA fields 'bare', 'sand', 'woody' and 'built'. The calculated values are before step 3 feature counts in layers 'Baresoil', 'Sandbeach', Woodyland' and 'Builtup' respectively.
- Make new features in layers 'Woodyland', 'Sandbeach', 'Baresoil' and 'Builtup' if any.
- Press "go to next feature". Now, before jumping to next grid tile, the plugin AutoField will execute some expressions on rest of the fields of NAM_USA based on the calculated values of 'bare', 'sand', 'woody' and 'built' in step 2 and current values.
At present I have to calculate expression on all four fields individually in step 2.
What I want : Calculate expression on all four fields in step 2 in a single click.
Is there any method or plugin by which I can reduce the efforts of calculating individually?
I do not have good knowledge of PyQGIS.
qgis qgis-plugins qgis-processing
add a comment |
I have 5 layers:
- NAM_USA (It has four fields of our interest, named 'bare', 'sand', 'woody' and 'built' depicting feature counts in each of the below corresponding layers.)
- Baresoil
- Woodyland
- Sandbeach
- Builtup
The process is :
- Jump to a feature(grid) in NAM_USA using go2nextfeature plugin.
- Calculate predefined expressions on NAM_USA fields 'bare', 'sand', 'woody' and 'built'. The calculated values are before step 3 feature counts in layers 'Baresoil', 'Sandbeach', Woodyland' and 'Builtup' respectively.
- Make new features in layers 'Woodyland', 'Sandbeach', 'Baresoil' and 'Builtup' if any.
- Press "go to next feature". Now, before jumping to next grid tile, the plugin AutoField will execute some expressions on rest of the fields of NAM_USA based on the calculated values of 'bare', 'sand', 'woody' and 'built' in step 2 and current values.
At present I have to calculate expression on all four fields individually in step 2.
What I want : Calculate expression on all four fields in step 2 in a single click.
Is there any method or plugin by which I can reduce the efforts of calculating individually?
I do not have good knowledge of PyQGIS.
qgis qgis-plugins qgis-processing
2
one hint : rephrase your question to make it more "understandable" ...
– snaileater
16 hours ago
Done!!! Kindly see!!
– Keshav Sharma
15 hours ago
If you can update to QGIS 3.4, you won't have to re-calculate your fields when you update the layer. QGIS 3 has virtual fields, which automatically stay up to date. This feature replaced the AutoField plugin.
– csk
8 hours ago
add a comment |
I have 5 layers:
- NAM_USA (It has four fields of our interest, named 'bare', 'sand', 'woody' and 'built' depicting feature counts in each of the below corresponding layers.)
- Baresoil
- Woodyland
- Sandbeach
- Builtup
The process is :
- Jump to a feature(grid) in NAM_USA using go2nextfeature plugin.
- Calculate predefined expressions on NAM_USA fields 'bare', 'sand', 'woody' and 'built'. The calculated values are before step 3 feature counts in layers 'Baresoil', 'Sandbeach', Woodyland' and 'Builtup' respectively.
- Make new features in layers 'Woodyland', 'Sandbeach', 'Baresoil' and 'Builtup' if any.
- Press "go to next feature". Now, before jumping to next grid tile, the plugin AutoField will execute some expressions on rest of the fields of NAM_USA based on the calculated values of 'bare', 'sand', 'woody' and 'built' in step 2 and current values.
At present I have to calculate expression on all four fields individually in step 2.
What I want : Calculate expression on all four fields in step 2 in a single click.
Is there any method or plugin by which I can reduce the efforts of calculating individually?
I do not have good knowledge of PyQGIS.
qgis qgis-plugins qgis-processing
I have 5 layers:
- NAM_USA (It has four fields of our interest, named 'bare', 'sand', 'woody' and 'built' depicting feature counts in each of the below corresponding layers.)
- Baresoil
- Woodyland
- Sandbeach
- Builtup
The process is :
- Jump to a feature(grid) in NAM_USA using go2nextfeature plugin.
- Calculate predefined expressions on NAM_USA fields 'bare', 'sand', 'woody' and 'built'. The calculated values are before step 3 feature counts in layers 'Baresoil', 'Sandbeach', Woodyland' and 'Builtup' respectively.
- Make new features in layers 'Woodyland', 'Sandbeach', 'Baresoil' and 'Builtup' if any.
- Press "go to next feature". Now, before jumping to next grid tile, the plugin AutoField will execute some expressions on rest of the fields of NAM_USA based on the calculated values of 'bare', 'sand', 'woody' and 'built' in step 2 and current values.
At present I have to calculate expression on all four fields individually in step 2.
What I want : Calculate expression on all four fields in step 2 in a single click.
Is there any method or plugin by which I can reduce the efforts of calculating individually?
I do not have good knowledge of PyQGIS.
qgis qgis-plugins qgis-processing
qgis qgis-plugins qgis-processing
edited 14 mins ago
Keshav Sharma
asked 16 hours ago
Keshav SharmaKeshav Sharma
424
424
2
one hint : rephrase your question to make it more "understandable" ...
– snaileater
16 hours ago
Done!!! Kindly see!!
– Keshav Sharma
15 hours ago
If you can update to QGIS 3.4, you won't have to re-calculate your fields when you update the layer. QGIS 3 has virtual fields, which automatically stay up to date. This feature replaced the AutoField plugin.
– csk
8 hours ago
add a comment |
2
one hint : rephrase your question to make it more "understandable" ...
– snaileater
16 hours ago
Done!!! Kindly see!!
– Keshav Sharma
15 hours ago
If you can update to QGIS 3.4, you won't have to re-calculate your fields when you update the layer. QGIS 3 has virtual fields, which automatically stay up to date. This feature replaced the AutoField plugin.
– csk
8 hours ago
2
2
one hint : rephrase your question to make it more "understandable" ...
– snaileater
16 hours ago
one hint : rephrase your question to make it more "understandable" ...
– snaileater
16 hours ago
Done!!! Kindly see!!
– Keshav Sharma
15 hours ago
Done!!! Kindly see!!
– Keshav Sharma
15 hours ago
If you can update to QGIS 3.4, you won't have to re-calculate your fields when you update the layer. QGIS 3 has virtual fields, which automatically stay up to date. This feature replaced the AutoField plugin.
– csk
8 hours ago
If you can update to QGIS 3.4, you won't have to re-calculate your fields when you update the layer. QGIS 3 has virtual fields, which automatically stay up to date. This feature replaced the AutoField plugin.
– csk
8 hours ago
add a comment |
1 Answer
1
active
oldest
votes
Not sure i fully understand your question but ... :
In NAM_USA u can populate your 4 fields (bare,sand, woody, built) with the following expression :
intersecting_geom_count('bare_layer_name')
, intersecting_geom_count('sand_layer_name')
and so on ...
Any change made in the four layers should affect the columns of your NAM_USA layer (after leaving the edit mode of the underlying layers and having saved the edits made + maybe a little map refresh ...)
So nothing is calculated 'manually' ...
the expression is not seems to be workin in QGIS 2.18.12. currently I have added 4 project variables like Bare_count is written as (layer_property( 'Baresoil' , 'feature_count')). In field expression I use eval(@Bare_count) expression to get the feature counts.
– Keshav Sharma
13 hours ago
mmm ... QGIS 2.18.12 maybe ... u didn't mention version in your question. i think intersecting_geom_count appeared in a next release of QGIS ... is the use of QGIS 2.18 mandatory for you ? What u have with your expression is a feature count by layer i think u're expecting a feature count by NAM_USA feature (or i don't understand your data structure...)
– snaileater
13 hours ago
I HAVE EDITED THE QUESTION MORE SIMPLY.
– Keshav Sharma
10 hours ago
Really lol ? ... u didn't answer my question : i suppose u're expecting feature count by grid (=NAM_USA feature) ?
– snaileater
10 hours ago
intersecting_geom_count
is part of the RefFunctions plugin, not part of any QGIS version. Install the plugin to get access to this function.
– csk
8 hours ago
|
show 2 more comments
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
});
}
});
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%2f319332%2fupdating-two-or-more-fields-in-qgis%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Not sure i fully understand your question but ... :
In NAM_USA u can populate your 4 fields (bare,sand, woody, built) with the following expression :
intersecting_geom_count('bare_layer_name')
, intersecting_geom_count('sand_layer_name')
and so on ...
Any change made in the four layers should affect the columns of your NAM_USA layer (after leaving the edit mode of the underlying layers and having saved the edits made + maybe a little map refresh ...)
So nothing is calculated 'manually' ...
the expression is not seems to be workin in QGIS 2.18.12. currently I have added 4 project variables like Bare_count is written as (layer_property( 'Baresoil' , 'feature_count')). In field expression I use eval(@Bare_count) expression to get the feature counts.
– Keshav Sharma
13 hours ago
mmm ... QGIS 2.18.12 maybe ... u didn't mention version in your question. i think intersecting_geom_count appeared in a next release of QGIS ... is the use of QGIS 2.18 mandatory for you ? What u have with your expression is a feature count by layer i think u're expecting a feature count by NAM_USA feature (or i don't understand your data structure...)
– snaileater
13 hours ago
I HAVE EDITED THE QUESTION MORE SIMPLY.
– Keshav Sharma
10 hours ago
Really lol ? ... u didn't answer my question : i suppose u're expecting feature count by grid (=NAM_USA feature) ?
– snaileater
10 hours ago
intersecting_geom_count
is part of the RefFunctions plugin, not part of any QGIS version. Install the plugin to get access to this function.
– csk
8 hours ago
|
show 2 more comments
Not sure i fully understand your question but ... :
In NAM_USA u can populate your 4 fields (bare,sand, woody, built) with the following expression :
intersecting_geom_count('bare_layer_name')
, intersecting_geom_count('sand_layer_name')
and so on ...
Any change made in the four layers should affect the columns of your NAM_USA layer (after leaving the edit mode of the underlying layers and having saved the edits made + maybe a little map refresh ...)
So nothing is calculated 'manually' ...
the expression is not seems to be workin in QGIS 2.18.12. currently I have added 4 project variables like Bare_count is written as (layer_property( 'Baresoil' , 'feature_count')). In field expression I use eval(@Bare_count) expression to get the feature counts.
– Keshav Sharma
13 hours ago
mmm ... QGIS 2.18.12 maybe ... u didn't mention version in your question. i think intersecting_geom_count appeared in a next release of QGIS ... is the use of QGIS 2.18 mandatory for you ? What u have with your expression is a feature count by layer i think u're expecting a feature count by NAM_USA feature (or i don't understand your data structure...)
– snaileater
13 hours ago
I HAVE EDITED THE QUESTION MORE SIMPLY.
– Keshav Sharma
10 hours ago
Really lol ? ... u didn't answer my question : i suppose u're expecting feature count by grid (=NAM_USA feature) ?
– snaileater
10 hours ago
intersecting_geom_count
is part of the RefFunctions plugin, not part of any QGIS version. Install the plugin to get access to this function.
– csk
8 hours ago
|
show 2 more comments
Not sure i fully understand your question but ... :
In NAM_USA u can populate your 4 fields (bare,sand, woody, built) with the following expression :
intersecting_geom_count('bare_layer_name')
, intersecting_geom_count('sand_layer_name')
and so on ...
Any change made in the four layers should affect the columns of your NAM_USA layer (after leaving the edit mode of the underlying layers and having saved the edits made + maybe a little map refresh ...)
So nothing is calculated 'manually' ...
Not sure i fully understand your question but ... :
In NAM_USA u can populate your 4 fields (bare,sand, woody, built) with the following expression :
intersecting_geom_count('bare_layer_name')
, intersecting_geom_count('sand_layer_name')
and so on ...
Any change made in the four layers should affect the columns of your NAM_USA layer (after leaving the edit mode of the underlying layers and having saved the edits made + maybe a little map refresh ...)
So nothing is calculated 'manually' ...
answered 14 hours ago
snaileatersnaileater
1,911614
1,911614
the expression is not seems to be workin in QGIS 2.18.12. currently I have added 4 project variables like Bare_count is written as (layer_property( 'Baresoil' , 'feature_count')). In field expression I use eval(@Bare_count) expression to get the feature counts.
– Keshav Sharma
13 hours ago
mmm ... QGIS 2.18.12 maybe ... u didn't mention version in your question. i think intersecting_geom_count appeared in a next release of QGIS ... is the use of QGIS 2.18 mandatory for you ? What u have with your expression is a feature count by layer i think u're expecting a feature count by NAM_USA feature (or i don't understand your data structure...)
– snaileater
13 hours ago
I HAVE EDITED THE QUESTION MORE SIMPLY.
– Keshav Sharma
10 hours ago
Really lol ? ... u didn't answer my question : i suppose u're expecting feature count by grid (=NAM_USA feature) ?
– snaileater
10 hours ago
intersecting_geom_count
is part of the RefFunctions plugin, not part of any QGIS version. Install the plugin to get access to this function.
– csk
8 hours ago
|
show 2 more comments
the expression is not seems to be workin in QGIS 2.18.12. currently I have added 4 project variables like Bare_count is written as (layer_property( 'Baresoil' , 'feature_count')). In field expression I use eval(@Bare_count) expression to get the feature counts.
– Keshav Sharma
13 hours ago
mmm ... QGIS 2.18.12 maybe ... u didn't mention version in your question. i think intersecting_geom_count appeared in a next release of QGIS ... is the use of QGIS 2.18 mandatory for you ? What u have with your expression is a feature count by layer i think u're expecting a feature count by NAM_USA feature (or i don't understand your data structure...)
– snaileater
13 hours ago
I HAVE EDITED THE QUESTION MORE SIMPLY.
– Keshav Sharma
10 hours ago
Really lol ? ... u didn't answer my question : i suppose u're expecting feature count by grid (=NAM_USA feature) ?
– snaileater
10 hours ago
intersecting_geom_count
is part of the RefFunctions plugin, not part of any QGIS version. Install the plugin to get access to this function.
– csk
8 hours ago
the expression is not seems to be workin in QGIS 2.18.12. currently I have added 4 project variables like Bare_count is written as (layer_property( 'Baresoil' , 'feature_count')). In field expression I use eval(@Bare_count) expression to get the feature counts.
– Keshav Sharma
13 hours ago
the expression is not seems to be workin in QGIS 2.18.12. currently I have added 4 project variables like Bare_count is written as (layer_property( 'Baresoil' , 'feature_count')). In field expression I use eval(@Bare_count) expression to get the feature counts.
– Keshav Sharma
13 hours ago
mmm ... QGIS 2.18.12 maybe ... u didn't mention version in your question. i think intersecting_geom_count appeared in a next release of QGIS ... is the use of QGIS 2.18 mandatory for you ? What u have with your expression is a feature count by layer i think u're expecting a feature count by NAM_USA feature (or i don't understand your data structure...)
– snaileater
13 hours ago
mmm ... QGIS 2.18.12 maybe ... u didn't mention version in your question. i think intersecting_geom_count appeared in a next release of QGIS ... is the use of QGIS 2.18 mandatory for you ? What u have with your expression is a feature count by layer i think u're expecting a feature count by NAM_USA feature (or i don't understand your data structure...)
– snaileater
13 hours ago
I HAVE EDITED THE QUESTION MORE SIMPLY.
– Keshav Sharma
10 hours ago
I HAVE EDITED THE QUESTION MORE SIMPLY.
– Keshav Sharma
10 hours ago
Really lol ? ... u didn't answer my question : i suppose u're expecting feature count by grid (=NAM_USA feature) ?
– snaileater
10 hours ago
Really lol ? ... u didn't answer my question : i suppose u're expecting feature count by grid (=NAM_USA feature) ?
– snaileater
10 hours ago
intersecting_geom_count
is part of the RefFunctions plugin, not part of any QGIS version. Install the plugin to get access to this function.– csk
8 hours ago
intersecting_geom_count
is part of the RefFunctions plugin, not part of any QGIS version. Install the plugin to get access to this function.– csk
8 hours ago
|
show 2 more comments
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%2f319332%2fupdating-two-or-more-fields-in-qgis%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
2
one hint : rephrase your question to make it more "understandable" ...
– snaileater
16 hours ago
Done!!! Kindly see!!
– Keshav Sharma
15 hours ago
If you can update to QGIS 3.4, you won't have to re-calculate your fields when you update the layer. QGIS 3 has virtual fields, which automatically stay up to date. This feature replaced the AutoField plugin.
– csk
8 hours ago