No output from GRASS 7 r.reclass in Processing Python scriptNo output generated with “r.drain” GRASS...

Promise.all returning empty objects

Taking an academic pseudonym?

How do I fight with Heavy Armor as a Wizard with Tenser's Transformation?

Was there a pre-determined arrangement for the division of Germany in case it surrendered before any Soviet forces entered its territory?

In the Lost in Space intro why was Dr. Smith actor listed as a special guest star?

Identical projects by students at two different colleges: still plagiarism?

Was Opportunity's last message to Earth "My battery is low and it's getting dark"?

What does an unprocessed RAW file look like?

How would an EMP effect spacesuits (and small-arms weapons)?

Is layered encryption more secure than long passwords?

Sticky Strike or Sticky Delta

What's the reason that we have a different number of days each month?

Trying to detect if any checked values contains a specific string

How can I differentiate duration vs starting time

What would be some possible ways of escaping higher gravity planets?

Renting a 2CV in France

Why do objects rebound after hitting the ground?

"I showed the monkey himself in the mirror". Why is this sentence grammatical?

How to draw a node with two options using TikZ graphs in LaTeX

How do I avoid the "chosen hero" feeling?

Why is it that Bernie Sanders is always called a "socialist"?

Is there a way to pause a running process on Linux systems and resume later?

Crack the bank account's password!

Dealing with an internal ScriptKiddie



No output from GRASS 7 r.reclass in Processing Python script


No output generated with “r.drain” GRASS moduler.viewshed Raster map not foundspurious “.tif Exists” errors on QGIS Python script processingPyQGIS GRASS r.reclass from Processing without resultAlgorithm r.reclass in QGIS gives same results with different reclass rulesQGIS Processing input list of numbers?QGIS 3 r.texture no outputQGIS - Struggling with r.reclass, North must be larger than south, etc - error log in postDEM File “not found” Error when running r.watershed with Processing Toolbox in QGIS 3.4.2 with GRASSUnable to load output layer from Python algorithm in QGIS 3













0















I want to run the r.reclass tool in python on a raster layer to reclassify 1 value (and leave the rest the way they are).



Here is my best attempt so far, after trying to reference documentation and other examples. Here is my code:



import processing

input_raster = QgsRasterLayer('/Users/ep9k/Desktop/Key-LogEcovaluator/Rasters/AestheticMax.tif', 'raster')
output_raster = '/Users/ep9k/Desktop/OutputReclass.tif'
rules_file = '/Users/ep9k/Desktop/reclassrules.txt'


parameters = {'Input' : input_raster,
'rules' : rules_file,
'Output' : output_raster,
'GRASS_REGION_PARAMETER' : '1277290, 1314314, -14004, 11845', #this is the exent of my raster layer
'GRASS_REGION_CELLSIZE_PARAMETER' : 0
}

processing.runAndLoadResults('grass7:r.reclass', parameters)


I run the script and I don't get any errors, but nothing happens. No output, nothing is reclassified. I think I am missing something obvious here.



I get the help docs by running the following in the console:



processing.algorithmHelp("grass7:r.reclass")


I am confused by 2 of the input parameters. Specifically GRASS_RASTER_FORMAT_OPT and GRASS_RASTER_FORMAT_META. Are these required?










share|improve this question




















  • 1





    It looks like you're using the older 2.x API under QGIS 3?

    – ndawson
    yesterday
















0















I want to run the r.reclass tool in python on a raster layer to reclassify 1 value (and leave the rest the way they are).



Here is my best attempt so far, after trying to reference documentation and other examples. Here is my code:



import processing

input_raster = QgsRasterLayer('/Users/ep9k/Desktop/Key-LogEcovaluator/Rasters/AestheticMax.tif', 'raster')
output_raster = '/Users/ep9k/Desktop/OutputReclass.tif'
rules_file = '/Users/ep9k/Desktop/reclassrules.txt'


parameters = {'Input' : input_raster,
'rules' : rules_file,
'Output' : output_raster,
'GRASS_REGION_PARAMETER' : '1277290, 1314314, -14004, 11845', #this is the exent of my raster layer
'GRASS_REGION_CELLSIZE_PARAMETER' : 0
}

processing.runAndLoadResults('grass7:r.reclass', parameters)


I run the script and I don't get any errors, but nothing happens. No output, nothing is reclassified. I think I am missing something obvious here.



I get the help docs by running the following in the console:



processing.algorithmHelp("grass7:r.reclass")


I am confused by 2 of the input parameters. Specifically GRASS_RASTER_FORMAT_OPT and GRASS_RASTER_FORMAT_META. Are these required?










share|improve this question




















  • 1





    It looks like you're using the older 2.x API under QGIS 3?

    – ndawson
    yesterday














0












0








0








I want to run the r.reclass tool in python on a raster layer to reclassify 1 value (and leave the rest the way they are).



Here is my best attempt so far, after trying to reference documentation and other examples. Here is my code:



import processing

input_raster = QgsRasterLayer('/Users/ep9k/Desktop/Key-LogEcovaluator/Rasters/AestheticMax.tif', 'raster')
output_raster = '/Users/ep9k/Desktop/OutputReclass.tif'
rules_file = '/Users/ep9k/Desktop/reclassrules.txt'


parameters = {'Input' : input_raster,
'rules' : rules_file,
'Output' : output_raster,
'GRASS_REGION_PARAMETER' : '1277290, 1314314, -14004, 11845', #this is the exent of my raster layer
'GRASS_REGION_CELLSIZE_PARAMETER' : 0
}

processing.runAndLoadResults('grass7:r.reclass', parameters)


I run the script and I don't get any errors, but nothing happens. No output, nothing is reclassified. I think I am missing something obvious here.



I get the help docs by running the following in the console:



processing.algorithmHelp("grass7:r.reclass")


I am confused by 2 of the input parameters. Specifically GRASS_RASTER_FORMAT_OPT and GRASS_RASTER_FORMAT_META. Are these required?










share|improve this question
















I want to run the r.reclass tool in python on a raster layer to reclassify 1 value (and leave the rest the way they are).



Here is my best attempt so far, after trying to reference documentation and other examples. Here is my code:



import processing

input_raster = QgsRasterLayer('/Users/ep9k/Desktop/Key-LogEcovaluator/Rasters/AestheticMax.tif', 'raster')
output_raster = '/Users/ep9k/Desktop/OutputReclass.tif'
rules_file = '/Users/ep9k/Desktop/reclassrules.txt'


parameters = {'Input' : input_raster,
'rules' : rules_file,
'Output' : output_raster,
'GRASS_REGION_PARAMETER' : '1277290, 1314314, -14004, 11845', #this is the exent of my raster layer
'GRASS_REGION_CELLSIZE_PARAMETER' : 0
}

processing.runAndLoadResults('grass7:r.reclass', parameters)


I run the script and I don't get any errors, but nothing happens. No output, nothing is reclassified. I think I am missing something obvious here.



I get the help docs by running the following in the console:



processing.algorithmHelp("grass7:r.reclass")


I am confused by 2 of the input parameters. Specifically GRASS_RASTER_FORMAT_OPT and GRASS_RASTER_FORMAT_META. Are these required?







qgis pyqgis grass qgis-3 qgis-processing






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 4 mins ago









underdark

68.3k13177342




68.3k13177342










asked 2 days ago









Erich PurpurErich Purpur

314114




314114








  • 1





    It looks like you're using the older 2.x API under QGIS 3?

    – ndawson
    yesterday














  • 1





    It looks like you're using the older 2.x API under QGIS 3?

    – ndawson
    yesterday








1




1





It looks like you're using the older 2.x API under QGIS 3?

– ndawson
yesterday





It looks like you're using the older 2.x API under QGIS 3?

– ndawson
yesterday










0






active

oldest

votes











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%2f313250%2fno-output-from-grass-7-r-reclass-in-processing-python-script%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















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%2f313250%2fno-output-from-grass-7-r-reclass-in-processing-python-script%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

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

is 'sed' thread safeWhat should someone know about using Python scripts in the shell?Nexenta bash script uses...

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