Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

geolocate_uavsar hanging #34

Open
jacktarricone opened this issue Jun 29, 2022 · 5 comments
Open

geolocate_uavsar hanging #34

jacktarricone opened this issue Jun 29, 2022 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@jacktarricone
Copy link
Contributor

jacktarricone commented Jun 29, 2022

@ZachKeskinen @rpalomaki Issue with geolocate_uavsar. Maybe test it out on your local machines and see if it will work? It produced the llh .tifs, but then isn't ingesting them to the geocodeUsingGdalWarp function.

%matplotlib inline
import sys
import os
import glob
import numpy as np
from osgeo import gdal
import matplotlib.pyplot as plt
import rasterio as rio
from rasterio.plot import show
from uavsar_pytools.georeference import geolocate_uavsar

## set function inputs

# input data
unw_data = '/Users/jacktarricone/jemez_isce/igrams/20200212T1545_20200226T1627/20200212T1545_20200226T1627.unw_snaphu.unw.vrt'

# annotationn file
ann_fp = '/Users/jacktarricone/jemez_isce/download/alamos_35915_20013_000_200226_L090HH_01_BU.ann'

# saving directory
out_dir = '/Users/jacktarricone/jemez_isce/igrams/20200212T1545_20200226T1627'

# lat lon heigh file
llh_fp = '/Users/jacktarricone/jemez_isce/download/alamos_35915_01_BU_s1_2x8.llh'

# run funciton
unw_geolocated = geolocate_uavsar(in_fp = unw_data, ann_fp = ann_fp, out_dir = out_dir, llh_fp = llh_fp)
print(unw_geolocated[0])

output
Screen Shot 2022-06-29 at 10 42 36 AM

@jacktarricone jacktarricone added the bug Something isn't working label Jun 29, 2022
@rpalomaki
Copy link

@jacktarricone Can you upload the exact files you are using to a directory somewhere so we can test? Maybe a new folder at tests/data or something?

@jacktarricone
Copy link
Contributor Author

jacktarricone commented Jun 29, 2022

@rpalomaki Data is on the google drive here, and this ISCE script of how I generated the unw file https://github.com/SnowEx/uavsar_snow/blob/main/examples/snowex_isce_uavsar_processing_tutorial.ipynb

@jacktarricone
Copy link
Contributor Author

I broke geocodeUsingGdalWarp out into pieces and tried running each separately. Everything works until the gdal.warp at the end. Given we didn't change anything and it was working in uavsar_snow and my local nb, do we think this is possible a gdal bug? I'm going to try going down to past versions of gdal to see if it works.

Screen Shot 2022-06-29 at 2 45 39 PM

@jacktarricone
Copy link
Contributor Author

jacktarricone commented Jun 29, 2022

Update - It finally ran but took 20 minutes. I'm not sure why given it used to take maybe 20 seconds with larger datasets.

Even when going back and rerunning the code in https://github.com/SnowEx/uavsar_snow/blob/main/examples/carc_geolocate_test.ipynb, it's still taking a long time.

@ZachKeskinen did you change anything when importing into uavsar_pytools? I wouldn't imagine so and therefore am caused what could be causing the slowdown..

@ZachHoppinen
Copy link
Contributor

I don't think so, I think the only pieces I might have changed would be all file io so shouldn't affect geocoding.

versionwise it was working with gdal == 3.0.2 on my computer when we were testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants