Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Subtract images in batch process(leap year and regular year)  (Read 27916 times)

0 Members and 1 Guest are viewing this topic.

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Subtract images in batch process(leap year and regular year)
« Reply #75 on: January 18, 2015, 10:20:49 PM »
Recent post elsewhere.
http://gis.stackexchange.com/questions/129487/how-to-subtract-rasters-using-the-gdal-calculate-command
Is this what the OP is doing?
Quote
just want to know how to subtract two raster using gdal_calculate command? Or what is the proper way of subtracting using this? Any idea would be greatly appreciated.
Note: gdal_calc is different from gdal_calculate.py. The raster I am using have different dimensions.

Squashman



    Specialist
  • Thanked: 134
  • Experience: Experienced
  • OS: Other
Re: Subtract images in batch process(leap year and regular year)
« Reply #76 on: January 19, 2015, 07:19:32 AM »
Yes I really want to. Maybe because it's missing some command?A command which will make it execute? And it just call the ordinal date and echoed that is why it was displayed only on the screen.
This just tells me that the several weeks we have been helping, you have not bothered to learn or understand any of the code we have supplied you on this forum or the other forums we have helped you on. At this point you have no other option but to accept my offer to do this for you by providing the information I requested in my previous post.

patio

  • Moderator


  • Genius
  • Maud' Dib
  • Thanked: 1769
    • Yes
  • Experience: Beginner
  • OS: Windows 7
Re: Subtract images in batch process(leap year and regular year)
« Reply #77 on: January 19, 2015, 07:47:02 AM »
Look on the bright side...we made it to Page 6....
" Anyone who goes to a psychiatrist should have his head examined. "

Squashman



    Specialist
  • Thanked: 134
  • Experience: Experienced
  • OS: Other
Re: Subtract images in batch process(leap year and regular year)
« Reply #78 on: January 19, 2015, 08:22:27 AM »
Look on the bright side...we made it to Page 6....
We might as well turn this website into a "Sports Betting" site.  Then at least I could make some money for all my hard work.  I will take the over on 8 pages.

patio

  • Moderator


  • Genius
  • Maud' Dib
  • Thanked: 1769
    • Yes
  • Experience: Beginner
  • OS: Windows 7
Re: Subtract images in batch process(leap year and regular year)
« Reply #79 on: January 19, 2015, 08:35:47 AM »
OK...i'll take the Under....i can lock the Thread...:P
" Anyone who goes to a psychiatrist should have his head examined. "

Squashman



    Specialist
  • Thanked: 134
  • Experience: Experienced
  • OS: Other
Re: Subtract images in batch process(leap year and regular year)
« Reply #80 on: January 19, 2015, 09:30:22 AM »
OK...i'll take the Under....i can lock the Thread...:P
You are just like Vegas.  Stacking the odds in your favor.  You should consider switching jobs.  ;D

patio

  • Moderator


  • Genius
  • Maud' Dib
  • Thanked: 1769
    • Yes
  • Experience: Beginner
  • OS: Windows 7
Re: Subtract images in batch process(leap year and regular year)
« Reply #81 on: January 19, 2015, 09:34:46 AM »
Not a bad idea...
" Anyone who goes to a psychiatrist should have his head examined. "

_unknown_

    Topic Starter


    Beginner

    • Experience: Beginner
    • OS: Windows 7
    Re: Subtract images in batch process(leap year and regular year)
    « Reply #82 on: January 19, 2015, 06:52:44 PM »
    This just tells me that the several weeks we have been helping, you have not bothered to learn or understand any of the code we have supplied you on this forum or the other forums we have helped you on. At this point you have no other option but to accept my offer to do this for you by providing the information I requested in my previous post.

    Can you teach me more please?  :'( I'm trying my best to understand the code you gave me. What should be answer to your question? What is the additional command to make the calculation execute instead of just displaying it on the screen? I can't understand codes that easy and immediately.

    Squashman



      Specialist
    • Thanked: 134
    • Experience: Experienced
    • OS: Other
    Re: Subtract images in batch process(leap year and regular year)
    « Reply #83 on: January 19, 2015, 08:01:50 PM »
    Show me the line of code that Foxidrive posted for you that runs your gdal_calculate command.

    _unknown_

      Topic Starter


      Beginner

      • Experience: Beginner
      • OS: Windows 7
      Re: Subtract images in batch process(leap year and regular year)
      « Reply #84 on: January 19, 2015, 08:25:55 PM »
      Show me the line of code that Foxidrive posted for you that runs your gdal_calculate command.

      Code: [Select]
      echo gdal_calculate --outfile=%out_path%\%%a --calc="((image1-image2))" --image2=%sample_path%\sample_file_!Month!.tif --image1=%in_path%\%%a --extent=INTERSECT

      Squashman



        Specialist
      • Thanked: 134
      • Experience: Experienced
      • OS: Other
      Re: Subtract images in batch process(leap year and regular year)
      « Reply #85 on: January 19, 2015, 08:45:42 PM »
      Code: [Select]
      echo gdal_calculate --outfile=%out_path%\%%a --calc="((image1-image2))" --image2=%sample_path%\sample_file_!Month!.tif --image1=%in_path%\%%a --extent=INTERSECT
      What is the first word in that line of code?
      « Last Edit: January 19, 2015, 08:59:07 PM by Squashman »

      _unknown_

        Topic Starter


        Beginner

        • Experience: Beginner
        • OS: Windows 7
        Re: Subtract images in batch process(leap year and regular year)
        « Reply #86 on: January 19, 2015, 08:59:08 PM »
        What is the first word on that line of code?


        The first word is echo. It display a string of characters on screen.

        Squashman



          Specialist
        • Thanked: 134
        • Experience: Experienced
        • OS: Other
        Re: Subtract images in batch process(leap year and regular year)
        « Reply #87 on: January 19, 2015, 09:05:07 PM »

        The first word is echo. It display a string of characters on screen.
        So if you want your gdal_calculate command to execute, what do you think you would need to remove from that line of code to make gdal_calculate execute?

        _unknown_

          Topic Starter


          Beginner

          • Experience: Beginner
          • OS: Windows 7
          Re: Subtract images in batch process(leap year and regular year)
          « Reply #88 on: January 19, 2015, 09:13:49 PM »
          So if you want your gdal_calculate command to execute, what do you think you would need to remove from that line of code to make gdal_calculate execute?

          I think I would need to remove the echo to execute. Does echo really affect lines of code or command from executing whereas it just prints string of characters on screen?

          Squashman



            Specialist
          • Thanked: 134
          • Experience: Experienced
          • OS: Other
          Re: Subtract images in batch process(leap year and regular year)
          « Reply #89 on: January 19, 2015, 09:39:46 PM »
          I think I would need to remove the echo to execute. Does echo really affect lines of code or command from executing whereas it just prints string of characters on screen?
          BINGO!