PolarGeospatialCenter / imagery_utils

Other
34 stars 10 forks source link

Updated pgc_ortho.py to check for existing .vrt files that are left b… #31

Closed bagl0025 closed 3 years ago

bagl0025 commented 3 years ago

…ehind if ctrl-c is used to exit. If they are found that image is included in the list of images to process. Added sys.exit(1) at the end if an image fails (requested by Danny).

Update ortho_functions.py to delete all existing temp_files before it begins processing. To compensate I changed the --save-temps and --wd sections. Save temps now renames temp files to .save. Using the --wd argument will preserve all files in the local directory.

bagl0025 commented 3 years ago

I approved those changes on git. I tried to pull them to my local version but nothing happened. What's the appropriate way to add these changes to my version so I can test them? I assume we will want Claire to review before merging them with the master branch?

On Wed, May 5, 2021 at 12:25 PM Erik Husby @.***> wrote:

@.**** commented on this pull request.

I haven't tested, but the addition looks good to me. Just made a quick PR into Brian's branch to refactor the change a bit.

In pgc_ortho.py https://github.com/PolarGeospatialCenter/imagery_utils/pull/31#discussion_r626757420 :

@@ -192,8 +192,33 @@ def main(): ortho_functions.formats[args.format] ))

  • done = os.path.isfile(dstfp)
  • if done is False:
  • Must be a better way to check this

Check out the PR I made into your branch Brian, showing how we can refactor this to simplify the code: #32 https://github.com/PolarGeospatialCenter/imagery_utils/pull/32

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PolarGeospatialCenter/imagery_utils/pull/31#pullrequestreview-652563735, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKODQ6NCELXRTEADHB6FM3DTMF5QNANCNFSM44FI2V7A .

bagl0025 commented 3 years ago

Erik, are you still working on the 3 unresolved references in ortho_functions?

ehusby commented 3 years ago

@bagl0025

Erik, are you still working on the 3 unresolved references in ortho_functions?

No, so there's really not a problem in the code. This is the only way to fix the unresolved reference issue in your PyCharm:

You can right-click on the "imagery_utils" folder in the filetree panel and "Mark directory as -> Sources Root". Then it treats PYTHONPATH as always having the path to your imagery_utils folder for all of the files in your imagery_utils PyCharm project.

bagl0025 commented 3 years ago

I thought I might me the only one seeing the conflict but I wasn't sure. I'll merge that PR.

On Fri, May 14, 2021 at 9:55 AM Erik Husby @.***> wrote:

@bagl0025 https://github.com/bagl0025

Erik, are you still working on the 3 unresolved references in ortho_functions?

No, so there's really not a problem in the code. This is the only way to fix the unresolved reference issue in your PyCharm:

You can right-click on the "imagery_utils" folder in the filetree panel and "Mark directory as -> Sources Root". Then it treats PYTHONPATH as always having the path to your imagery_utils folder for all of the files in your imagery_utils PyCharm project.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PolarGeospatialCenter/imagery_utils/pull/31#issuecomment-841295047, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKODQ6MOVSVIJ64WD5ZT3TDTNU2WLANCNFSM44FI2V7A .