Skip to content

Commit

Permalink
update requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
forrestfwilliams committed Feb 8, 2024
1 parent 865259b commit 4ff5c6a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
5 changes: 4 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ dependencies:
- pytest
- pytest-cov
- responses
- pystac
# For running
- python-dateutil
- requests
- tqdm
- urllib3
- pystac
- fsspec
- aiohttp
- pillow
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ dependencies = [
"requests",
"urllib3",
"tqdm",
"pystac",
"fsspec",
"aiohttp",
"pillow",
]
dynamic = ["version"]

Expand Down
8 changes: 5 additions & 3 deletions src/hyp3_sdk/stac.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,11 @@ def create_stac_item(job: Job) -> pystac.Item:
base_url = job.to_dict()['files'][0]['url']
param_file_url = base_url.replace('.zip', '.txt')
param_file = ParameterFile.read(param_file_url)

unw_file_url = base_url.replace('.zip', '_unw_phase.tif')
geotransform, shape, epsg = get_geotiff_info_nogdal(unw_file_url)
bbox = get_bounding_box(geotransform, shape)

pattern = '%Y%m%dT%H%M%S'
start_time = datetime.strptime(param_file.reference_granule.split('_')[3], pattern).replace(tzinfo=timezone.utc)
stop_time = datetime.strptime(param_file.secondary_granule.split('_')[3], pattern).replace(tzinfo=timezone.utc)
Expand All @@ -321,9 +326,6 @@ def create_stac_item(job: Job) -> pystac.Item:
# unw_file_url = '/vsicurl/' + base_url.replace('.zip', '_unw_phase.tif')
# geotransform, shape, epsg = get_geotiff_info(unw_file_url)

unw_file_url = base_url.replace('.zip', '_unw_phase.tif')
geotransform, shape, epsg = get_geotiff_info_nogdal(unw_file_url)
bbox = get_bounding_box(geotransform, shape)

image_properties = {
'data_type': 'float32',
Expand Down

0 comments on commit 4ff5c6a

Please sign in to comment.