Vector Fields as Input Variable in Field Calculator Planned maintenance scheduled April 23,...

If Windows 7 doesn't support WSL, then what is "Subsystem for UNIX-based Applications"?

How long can equipment go unused before powering up runs the risk of damage?

Deconstruction is ambiguous

Is CEO the "profession" with the most psychopaths?

Did Mueller's report provide an evidentiary basis for the claim of Russian govt election interference via social media?

Why does it sometimes sound good to play a grace note as a lead in to a note in a melody?

How often does castling occur in grandmaster games?

Why can't I install Tomboy in Ubuntu Mate 19.04?

1-probability to calculate two events in a row

Project Euler #1 in C++

Amount of permutations on an NxNxN Rubik's Cube

How were pictures turned from film to a big picture in a picture frame before digital scanning?

How do I find out the mythology and history of my Fortress?

Co-worker has annoying ringtone

Significance of Cersei's obsession with elephants?

An adverb for when you're not exaggerating

Can a Beast Master ranger change beast companions?

preposition before coffee

Drawing spherical mirrors

Should a wizard buy fine inks every time he want to copy spells into his spellbook?

Getting prompted for verification code but where do I put it in?

The Nth Gryphon Number

How to report t statistic from R

What's the point of the test set?



Vector Fields as Input Variable in Field Calculator



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?How to connect input parameter to the field calculator algorithm within the graphical modeler?Graphical modeler in QGIS 3.0.3 - Access Vector Field in CalculatorHow to link Number value with Field calculator in QGIS Modeler ?How can I refer to a model variable in a Field Calculator or Pyculator formula?How to connect input parameter to the field calculator algorithm within the graphical modeler?QGIS graphical modeler calculatorNumber inputs as raster calculator variables in QGIS ModelerField Types in ArcMap, QGIS and their respective modelersField calculator using pyqgisGraphical modeler in QGIS 3.0.3 - Access Vector Field in CalculatorRecovering output value in QGIS graphical modeler?Referencing another layer in Field Calculator inside Graphical ModelerWhat to use instead of 'Table' input in QGIS 3 modeller





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







1















I’m working with QGIS 3.2 Bonn and I try to build a workflow in the graphic modeler. The model aims to build variable buffers depending on values from two attribute fields of an input vector layer. For calculating the distances for the dynamic buffers I use the field calculator and the input fields to the field calculator are addressed by their distinct names.



This only works as long as the attribute fields of the input layer always have the same names, so I wanted to modify the model for making it more flexible to other input vector layers with different field names. For this I tried to use the Vector-Field variable as input to the field calculator. In the Variable distance buffer tool, I managed to use one Vector-Field as input variable, but with the field calculator I haven't been succesfull yet.



Is it possible to use Vector Field as input in the modeler, or do I have to write a script for that?



Would be really glad if you could help me.



(I also searched in gis-stackexchange and the net but couldn’t find an answer to this for QGIS3.x.

I found only other questions with similar problems but without any solution:
Graphical modeler in QGIS 3.0.3 - Access Vector Field in Calculator

or questions refering to QGIS2.x:
How to link Number value with Field calculator in QGIS Modeler ?
)



An extract of my model with the part I don't get worked:



enter image description here



Here a screenshot of the field calculator and my idea of how to use it:



enter image description here










share|improve this question
















bumped to the homepage by Community 12 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • Did you see this answer? gis.stackexchange.com/a/177429/122597

    – Stefan
    Sep 8 '18 at 20:39











  • Hi Stefan, yes, I saw this post. But it's concerning QGIS 2.x and I cannot use the script in QGIS 3.x Apart from that, at the moment I would prefer a pure modeler solution as I'm totally new to scripting and pyQGIS3

    – L.Blanc
    Sep 8 '18 at 20:43




















1















I’m working with QGIS 3.2 Bonn and I try to build a workflow in the graphic modeler. The model aims to build variable buffers depending on values from two attribute fields of an input vector layer. For calculating the distances for the dynamic buffers I use the field calculator and the input fields to the field calculator are addressed by their distinct names.



This only works as long as the attribute fields of the input layer always have the same names, so I wanted to modify the model for making it more flexible to other input vector layers with different field names. For this I tried to use the Vector-Field variable as input to the field calculator. In the Variable distance buffer tool, I managed to use one Vector-Field as input variable, but with the field calculator I haven't been succesfull yet.



Is it possible to use Vector Field as input in the modeler, or do I have to write a script for that?



Would be really glad if you could help me.



(I also searched in gis-stackexchange and the net but couldn’t find an answer to this for QGIS3.x.

I found only other questions with similar problems but without any solution:
Graphical modeler in QGIS 3.0.3 - Access Vector Field in Calculator

or questions refering to QGIS2.x:
How to link Number value with Field calculator in QGIS Modeler ?
)



An extract of my model with the part I don't get worked:



enter image description here



Here a screenshot of the field calculator and my idea of how to use it:



enter image description here










share|improve this question
















bumped to the homepage by Community 12 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • Did you see this answer? gis.stackexchange.com/a/177429/122597

    – Stefan
    Sep 8 '18 at 20:39











  • Hi Stefan, yes, I saw this post. But it's concerning QGIS 2.x and I cannot use the script in QGIS 3.x Apart from that, at the moment I would prefer a pure modeler solution as I'm totally new to scripting and pyQGIS3

    – L.Blanc
    Sep 8 '18 at 20:43
















1












1








1


2






I’m working with QGIS 3.2 Bonn and I try to build a workflow in the graphic modeler. The model aims to build variable buffers depending on values from two attribute fields of an input vector layer. For calculating the distances for the dynamic buffers I use the field calculator and the input fields to the field calculator are addressed by their distinct names.



This only works as long as the attribute fields of the input layer always have the same names, so I wanted to modify the model for making it more flexible to other input vector layers with different field names. For this I tried to use the Vector-Field variable as input to the field calculator. In the Variable distance buffer tool, I managed to use one Vector-Field as input variable, but with the field calculator I haven't been succesfull yet.



Is it possible to use Vector Field as input in the modeler, or do I have to write a script for that?



Would be really glad if you could help me.



(I also searched in gis-stackexchange and the net but couldn’t find an answer to this for QGIS3.x.

I found only other questions with similar problems but without any solution:
Graphical modeler in QGIS 3.0.3 - Access Vector Field in Calculator

or questions refering to QGIS2.x:
How to link Number value with Field calculator in QGIS Modeler ?
)



An extract of my model with the part I don't get worked:



enter image description here



Here a screenshot of the field calculator and my idea of how to use it:



enter image description here










share|improve this question
















I’m working with QGIS 3.2 Bonn and I try to build a workflow in the graphic modeler. The model aims to build variable buffers depending on values from two attribute fields of an input vector layer. For calculating the distances for the dynamic buffers I use the field calculator and the input fields to the field calculator are addressed by their distinct names.



This only works as long as the attribute fields of the input layer always have the same names, so I wanted to modify the model for making it more flexible to other input vector layers with different field names. For this I tried to use the Vector-Field variable as input to the field calculator. In the Variable distance buffer tool, I managed to use one Vector-Field as input variable, but with the field calculator I haven't been succesfull yet.



Is it possible to use Vector Field as input in the modeler, or do I have to write a script for that?



Would be really glad if you could help me.



(I also searched in gis-stackexchange and the net but couldn’t find an answer to this for QGIS3.x.

I found only other questions with similar problems but without any solution:
Graphical modeler in QGIS 3.0.3 - Access Vector Field in Calculator

or questions refering to QGIS2.x:
How to link Number value with Field calculator in QGIS Modeler ?
)



An extract of my model with the part I don't get worked:



enter image description here



Here a screenshot of the field calculator and my idea of how to use it:



enter image description here







qgis field-calculator qgis-modeler qgis-3






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 9 '18 at 8:48







L.Blanc

















asked Sep 8 '18 at 19:26









L.BlancL.Blanc

237




237





bumped to the homepage by Community 12 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 12 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Did you see this answer? gis.stackexchange.com/a/177429/122597

    – Stefan
    Sep 8 '18 at 20:39











  • Hi Stefan, yes, I saw this post. But it's concerning QGIS 2.x and I cannot use the script in QGIS 3.x Apart from that, at the moment I would prefer a pure modeler solution as I'm totally new to scripting and pyQGIS3

    – L.Blanc
    Sep 8 '18 at 20:43





















  • Did you see this answer? gis.stackexchange.com/a/177429/122597

    – Stefan
    Sep 8 '18 at 20:39











  • Hi Stefan, yes, I saw this post. But it's concerning QGIS 2.x and I cannot use the script in QGIS 3.x Apart from that, at the moment I would prefer a pure modeler solution as I'm totally new to scripting and pyQGIS3

    – L.Blanc
    Sep 8 '18 at 20:43



















Did you see this answer? gis.stackexchange.com/a/177429/122597

– Stefan
Sep 8 '18 at 20:39





Did you see this answer? gis.stackexchange.com/a/177429/122597

– Stefan
Sep 8 '18 at 20:39













Hi Stefan, yes, I saw this post. But it's concerning QGIS 2.x and I cannot use the script in QGIS 3.x Apart from that, at the moment I would prefer a pure modeler solution as I'm totally new to scripting and pyQGIS3

– L.Blanc
Sep 8 '18 at 20:43







Hi Stefan, yes, I saw this post. But it's concerning QGIS 2.x and I cannot use the script in QGIS 3.x Apart from that, at the moment I would prefer a pure modeler solution as I'm totally new to scripting and pyQGIS3

– L.Blanc
Sep 8 '18 at 20:43












1 Answer
1






active

oldest

votes


















0















Is it possible to use Vector Field as input in the modeler, or do I have to write a script for that?




No, it is not possible. I have tried everything* and you simply cannot make the Field Calculator aware of the Vector Fields you choose.



* I tried, for example, to join the Input Vector Layer with itself to have a clou about the Input Fields (using a prefi). Turns out that I cannot search all fields of a Layer to find out if the specific prefix is contained in the Field name.






share|improve this answer
























  • Hi Stefan, thanks for your answer. Do you know if the advanced python field calculator is able to handle input fields? Or do you think its the same problem with it. I have already tried with the advanced python field calculator but the syntax there is also not easy to unterstand for me.

    – L.Blanc
    Sep 9 '18 at 11:21











  • There are some hints on the syntax here: anitagraser.com/2013/04/20/advanced-python-field-calculator Unfortunately I don't think that you can target fields that are not known before runtime.

    – Stefan
    Sep 9 '18 at 15:16











  • I've read that article from anita graser, too. But I think it concerns the advanced python calculator outside of the graphic modeler. At least I couldn't rebuild the example in the modeler. I guess I have to learn python/pyQGIS and start scripting. Unfortunately - that seems to be more advanced than in QGIS2.

    – L.Blanc
    Sep 9 '18 at 16:49














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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f295323%2fvector-fields-as-input-variable-in-field-calculator%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









0















Is it possible to use Vector Field as input in the modeler, or do I have to write a script for that?




No, it is not possible. I have tried everything* and you simply cannot make the Field Calculator aware of the Vector Fields you choose.



* I tried, for example, to join the Input Vector Layer with itself to have a clou about the Input Fields (using a prefi). Turns out that I cannot search all fields of a Layer to find out if the specific prefix is contained in the Field name.






share|improve this answer
























  • Hi Stefan, thanks for your answer. Do you know if the advanced python field calculator is able to handle input fields? Or do you think its the same problem with it. I have already tried with the advanced python field calculator but the syntax there is also not easy to unterstand for me.

    – L.Blanc
    Sep 9 '18 at 11:21











  • There are some hints on the syntax here: anitagraser.com/2013/04/20/advanced-python-field-calculator Unfortunately I don't think that you can target fields that are not known before runtime.

    – Stefan
    Sep 9 '18 at 15:16











  • I've read that article from anita graser, too. But I think it concerns the advanced python calculator outside of the graphic modeler. At least I couldn't rebuild the example in the modeler. I guess I have to learn python/pyQGIS and start scripting. Unfortunately - that seems to be more advanced than in QGIS2.

    – L.Blanc
    Sep 9 '18 at 16:49


















0















Is it possible to use Vector Field as input in the modeler, or do I have to write a script for that?




No, it is not possible. I have tried everything* and you simply cannot make the Field Calculator aware of the Vector Fields you choose.



* I tried, for example, to join the Input Vector Layer with itself to have a clou about the Input Fields (using a prefi). Turns out that I cannot search all fields of a Layer to find out if the specific prefix is contained in the Field name.






share|improve this answer
























  • Hi Stefan, thanks for your answer. Do you know if the advanced python field calculator is able to handle input fields? Or do you think its the same problem with it. I have already tried with the advanced python field calculator but the syntax there is also not easy to unterstand for me.

    – L.Blanc
    Sep 9 '18 at 11:21











  • There are some hints on the syntax here: anitagraser.com/2013/04/20/advanced-python-field-calculator Unfortunately I don't think that you can target fields that are not known before runtime.

    – Stefan
    Sep 9 '18 at 15:16











  • I've read that article from anita graser, too. But I think it concerns the advanced python calculator outside of the graphic modeler. At least I couldn't rebuild the example in the modeler. I guess I have to learn python/pyQGIS and start scripting. Unfortunately - that seems to be more advanced than in QGIS2.

    – L.Blanc
    Sep 9 '18 at 16:49
















0












0








0








Is it possible to use Vector Field as input in the modeler, or do I have to write a script for that?




No, it is not possible. I have tried everything* and you simply cannot make the Field Calculator aware of the Vector Fields you choose.



* I tried, for example, to join the Input Vector Layer with itself to have a clou about the Input Fields (using a prefi). Turns out that I cannot search all fields of a Layer to find out if the specific prefix is contained in the Field name.






share|improve this answer














Is it possible to use Vector Field as input in the modeler, or do I have to write a script for that?




No, it is not possible. I have tried everything* and you simply cannot make the Field Calculator aware of the Vector Fields you choose.



* I tried, for example, to join the Input Vector Layer with itself to have a clou about the Input Fields (using a prefi). Turns out that I cannot search all fields of a Layer to find out if the specific prefix is contained in the Field name.







share|improve this answer












share|improve this answer



share|improve this answer










answered Sep 9 '18 at 10:08









StefanStefan

1,460218




1,460218













  • Hi Stefan, thanks for your answer. Do you know if the advanced python field calculator is able to handle input fields? Or do you think its the same problem with it. I have already tried with the advanced python field calculator but the syntax there is also not easy to unterstand for me.

    – L.Blanc
    Sep 9 '18 at 11:21











  • There are some hints on the syntax here: anitagraser.com/2013/04/20/advanced-python-field-calculator Unfortunately I don't think that you can target fields that are not known before runtime.

    – Stefan
    Sep 9 '18 at 15:16











  • I've read that article from anita graser, too. But I think it concerns the advanced python calculator outside of the graphic modeler. At least I couldn't rebuild the example in the modeler. I guess I have to learn python/pyQGIS and start scripting. Unfortunately - that seems to be more advanced than in QGIS2.

    – L.Blanc
    Sep 9 '18 at 16:49





















  • Hi Stefan, thanks for your answer. Do you know if the advanced python field calculator is able to handle input fields? Or do you think its the same problem with it. I have already tried with the advanced python field calculator but the syntax there is also not easy to unterstand for me.

    – L.Blanc
    Sep 9 '18 at 11:21











  • There are some hints on the syntax here: anitagraser.com/2013/04/20/advanced-python-field-calculator Unfortunately I don't think that you can target fields that are not known before runtime.

    – Stefan
    Sep 9 '18 at 15:16











  • I've read that article from anita graser, too. But I think it concerns the advanced python calculator outside of the graphic modeler. At least I couldn't rebuild the example in the modeler. I guess I have to learn python/pyQGIS and start scripting. Unfortunately - that seems to be more advanced than in QGIS2.

    – L.Blanc
    Sep 9 '18 at 16:49



















Hi Stefan, thanks for your answer. Do you know if the advanced python field calculator is able to handle input fields? Or do you think its the same problem with it. I have already tried with the advanced python field calculator but the syntax there is also not easy to unterstand for me.

– L.Blanc
Sep 9 '18 at 11:21





Hi Stefan, thanks for your answer. Do you know if the advanced python field calculator is able to handle input fields? Or do you think its the same problem with it. I have already tried with the advanced python field calculator but the syntax there is also not easy to unterstand for me.

– L.Blanc
Sep 9 '18 at 11:21













There are some hints on the syntax here: anitagraser.com/2013/04/20/advanced-python-field-calculator Unfortunately I don't think that you can target fields that are not known before runtime.

– Stefan
Sep 9 '18 at 15:16





There are some hints on the syntax here: anitagraser.com/2013/04/20/advanced-python-field-calculator Unfortunately I don't think that you can target fields that are not known before runtime.

– Stefan
Sep 9 '18 at 15:16













I've read that article from anita graser, too. But I think it concerns the advanced python calculator outside of the graphic modeler. At least I couldn't rebuild the example in the modeler. I guess I have to learn python/pyQGIS and start scripting. Unfortunately - that seems to be more advanced than in QGIS2.

– L.Blanc
Sep 9 '18 at 16:49







I've read that article from anita graser, too. But I think it concerns the advanced python calculator outside of the graphic modeler. At least I couldn't rebuild the example in the modeler. I guess I have to learn python/pyQGIS and start scripting. Unfortunately - that seems to be more advanced than in QGIS2.

– L.Blanc
Sep 9 '18 at 16:49




















draft saved

draft discarded




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f295323%2fvector-fields-as-input-variable-in-field-calculator%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

Щит и меч (фильм) Содержание Названия серий | Сюжет |...

Венесуэла на летних Олимпийских играх 2000 Содержание Состав...

Meter-Bus Содержание Параметры шины | Стандартизация |...