Replacing value of specific pixel using raster mask in ArcGIS Desktop?“Extract by Mask” changing raster...

What wound would be of little consequence to a biped but terrible for a quadruped?

List elements digit difference sort

How can I ensure my trip to the UK will not have to be cancelled because of Brexit?

How is the wildcard * interpreted as a command?

NASA's RS-25 Engines shut down time

Recommendation letter by significant other if you worked with them professionally?

What are the practical Opportunty Attack values for a bugbear, holding a reach weapon, with Polearm Mastery?

What are some noteworthy "mic-drop" moments in math?

Conservation of Mass and Energy

Shifting between bemols (flats) and diesis (sharps)in the key signature

Rewrite the power sum in terms of convolution

Database Backup for data and log files

Do f-stop and exposure time perfectly cancel?

Marriage green card at end of current visa with 2 Year residency requirement waiver in-process, question

Is it work or heat?

Why doesn't this Google Translate ad use the word "Translation" instead of "Translate"?

How to draw cubes in a 3 dimensional plane

Can you reject a postdoc offer after the PI has paid a large sum for flights/accommodation for your visit?

Why does Captain Marvel assume the people on this planet know this?

Was Luke Skywalker the leader of the Rebel forces on Hoth?

Child Theme Path Being Ignored With wp_enqueue_scripts

Accepted offer letter, position changed

When stopping and starting a tile job, what to do with the extra thinset from previous row's cleanup?

Are babies of evil humanoid species inherently evil?



Replacing value of specific pixel using raster mask in ArcGIS Desktop?


“Extract by Mask” changing raster pixel values…or not?Creating mask file from shapefile using ArcGIS for Desktop?PostGIS ST_MapAlgebra AssistanceExtracting raster pixel value in ArcGIS Desktop?Summing pixel values from several raster layers with partial overlap in QGIS?Removing pixels in raster map using ArcGIS for Desktop?Summing multiple rasters using ArcGIS Desktop?Summing pixel values within polygon zone in ArcGIS Desktop?How to extend Raster layer without pixel value data losingReplacing data in raster using condition?













0















I have two rasters: the first is a basin with all pixels values equal to 0. The second raster (mask) has a single pixel with value = 1. In fact, I need only one raster where all the pixels into the basin must be = 0 and this specific pixel (in the mask) must have the value 1.



How can I do this process using ArcGIS Desktop?



I tried to use raster calculator with the sum "Raster 1 + Raster 2", but it did not work because the result is all the pixels into the basin equal to 1.










share|improve this question

























  • I provided a quick answer, assuming that the mask covers all null values in the basin raster, but does your mask layer need to exclude additional areas in the basin? I can update to reflect that.

    – SaultDon
    3 hours ago











  • Many thanks, SaultDon. The mask doesn't cover all the pixels in the basin raster. The mask is just a isolated pixel and I'm tryng to use this pixel to change the value in the corresponding pixel at the basin raster.

    – Diêgo Araújo
    3 hours ago











  • Solved. Thank you. I used Cell Statistics instead Raster Calculator and checked the box "ignore no data". :)

    – Diêgo Araújo
    2 hours ago











  • You can post that as an answer to and mark as correct. Helps anyone else with the same problem find it easier.

    – SaultDon
    2 hours ago
















0















I have two rasters: the first is a basin with all pixels values equal to 0. The second raster (mask) has a single pixel with value = 1. In fact, I need only one raster where all the pixels into the basin must be = 0 and this specific pixel (in the mask) must have the value 1.



How can I do this process using ArcGIS Desktop?



I tried to use raster calculator with the sum "Raster 1 + Raster 2", but it did not work because the result is all the pixels into the basin equal to 1.










share|improve this question

























  • I provided a quick answer, assuming that the mask covers all null values in the basin raster, but does your mask layer need to exclude additional areas in the basin? I can update to reflect that.

    – SaultDon
    3 hours ago











  • Many thanks, SaultDon. The mask doesn't cover all the pixels in the basin raster. The mask is just a isolated pixel and I'm tryng to use this pixel to change the value in the corresponding pixel at the basin raster.

    – Diêgo Araújo
    3 hours ago











  • Solved. Thank you. I used Cell Statistics instead Raster Calculator and checked the box "ignore no data". :)

    – Diêgo Araújo
    2 hours ago











  • You can post that as an answer to and mark as correct. Helps anyone else with the same problem find it easier.

    – SaultDon
    2 hours ago














0












0








0








I have two rasters: the first is a basin with all pixels values equal to 0. The second raster (mask) has a single pixel with value = 1. In fact, I need only one raster where all the pixels into the basin must be = 0 and this specific pixel (in the mask) must have the value 1.



How can I do this process using ArcGIS Desktop?



I tried to use raster calculator with the sum "Raster 1 + Raster 2", but it did not work because the result is all the pixels into the basin equal to 1.










share|improve this question
















I have two rasters: the first is a basin with all pixels values equal to 0. The second raster (mask) has a single pixel with value = 1. In fact, I need only one raster where all the pixels into the basin must be = 0 and this specific pixel (in the mask) must have the value 1.



How can I do this process using ArcGIS Desktop?



I tried to use raster calculator with the sum "Raster 1 + Raster 2", but it did not work because the result is all the pixels into the basin equal to 1.







arcgis-desktop spatial-analyst raster-calculator






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 16 mins ago









PolyGeo

53.6k1781243




53.6k1781243










asked 3 hours ago









Diêgo AraújoDiêgo Araújo

62




62













  • I provided a quick answer, assuming that the mask covers all null values in the basin raster, but does your mask layer need to exclude additional areas in the basin? I can update to reflect that.

    – SaultDon
    3 hours ago











  • Many thanks, SaultDon. The mask doesn't cover all the pixels in the basin raster. The mask is just a isolated pixel and I'm tryng to use this pixel to change the value in the corresponding pixel at the basin raster.

    – Diêgo Araújo
    3 hours ago











  • Solved. Thank you. I used Cell Statistics instead Raster Calculator and checked the box "ignore no data". :)

    – Diêgo Araújo
    2 hours ago











  • You can post that as an answer to and mark as correct. Helps anyone else with the same problem find it easier.

    – SaultDon
    2 hours ago



















  • I provided a quick answer, assuming that the mask covers all null values in the basin raster, but does your mask layer need to exclude additional areas in the basin? I can update to reflect that.

    – SaultDon
    3 hours ago











  • Many thanks, SaultDon. The mask doesn't cover all the pixels in the basin raster. The mask is just a isolated pixel and I'm tryng to use this pixel to change the value in the corresponding pixel at the basin raster.

    – Diêgo Araújo
    3 hours ago











  • Solved. Thank you. I used Cell Statistics instead Raster Calculator and checked the box "ignore no data". :)

    – Diêgo Araújo
    2 hours ago











  • You can post that as an answer to and mark as correct. Helps anyone else with the same problem find it easier.

    – SaultDon
    2 hours ago

















I provided a quick answer, assuming that the mask covers all null values in the basin raster, but does your mask layer need to exclude additional areas in the basin? I can update to reflect that.

– SaultDon
3 hours ago





I provided a quick answer, assuming that the mask covers all null values in the basin raster, but does your mask layer need to exclude additional areas in the basin? I can update to reflect that.

– SaultDon
3 hours ago













Many thanks, SaultDon. The mask doesn't cover all the pixels in the basin raster. The mask is just a isolated pixel and I'm tryng to use this pixel to change the value in the corresponding pixel at the basin raster.

– Diêgo Araújo
3 hours ago





Many thanks, SaultDon. The mask doesn't cover all the pixels in the basin raster. The mask is just a isolated pixel and I'm tryng to use this pixel to change the value in the corresponding pixel at the basin raster.

– Diêgo Araújo
3 hours ago













Solved. Thank you. I used Cell Statistics instead Raster Calculator and checked the box "ignore no data". :)

– Diêgo Araújo
2 hours ago





Solved. Thank you. I used Cell Statistics instead Raster Calculator and checked the box "ignore no data". :)

– Diêgo Araújo
2 hours ago













You can post that as an answer to and mark as correct. Helps anyone else with the same problem find it easier.

– SaultDon
2 hours ago





You can post that as an answer to and mark as correct. Helps anyone else with the same problem find it easier.

– SaultDon
2 hours ago










1 Answer
1






active

oldest

votes


















1














Convert the 0 values in mask to 1:



Con(1,0,"mask")



Then convert the null values in basin to whatever mask is.



Con(IsNull("basin"),"mask","basin")



I think you can put them together, haven't used ArcGIS raster calculator in a while but this is a possible one-liner:



Con(IsNull("basin"),Con(1,0,"mask"),"basin")






share|improve this answer

























    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%2f315121%2freplacing-value-of-specific-pixel-using-raster-mask-in-arcgis-desktop%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









    1














    Convert the 0 values in mask to 1:



    Con(1,0,"mask")



    Then convert the null values in basin to whatever mask is.



    Con(IsNull("basin"),"mask","basin")



    I think you can put them together, haven't used ArcGIS raster calculator in a while but this is a possible one-liner:



    Con(IsNull("basin"),Con(1,0,"mask"),"basin")






    share|improve this answer






























      1














      Convert the 0 values in mask to 1:



      Con(1,0,"mask")



      Then convert the null values in basin to whatever mask is.



      Con(IsNull("basin"),"mask","basin")



      I think you can put them together, haven't used ArcGIS raster calculator in a while but this is a possible one-liner:



      Con(IsNull("basin"),Con(1,0,"mask"),"basin")






      share|improve this answer




























        1












        1








        1







        Convert the 0 values in mask to 1:



        Con(1,0,"mask")



        Then convert the null values in basin to whatever mask is.



        Con(IsNull("basin"),"mask","basin")



        I think you can put them together, haven't used ArcGIS raster calculator in a while but this is a possible one-liner:



        Con(IsNull("basin"),Con(1,0,"mask"),"basin")






        share|improve this answer















        Convert the 0 values in mask to 1:



        Con(1,0,"mask")



        Then convert the null values in basin to whatever mask is.



        Con(IsNull("basin"),"mask","basin")



        I think you can put them together, haven't used ArcGIS raster calculator in a while but this is a possible one-liner:



        Con(IsNull("basin"),Con(1,0,"mask"),"basin")







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 2 hours ago

























        answered 3 hours ago









        SaultDonSaultDon

        7,93312561




        7,93312561






























            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%2f315121%2freplacing-value-of-specific-pixel-using-raster-mask-in-arcgis-desktop%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

            (145452) 2005 RN43 Классификация | Примечания | Ссылки |...

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

            Энтрерриос (город) Содержание История | Географическое...