Skip to content

Commit

Permalink
drop dupicate search filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
jhkennedy committed Feb 29, 2024
1 parent 808cd57 commit 656ee0b
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions landsat/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,11 @@ def get_landsat_pairs_for_reference_scene(

df = gpd.GeoDataFrame.from_features(features)
df['datetime'] = pd.to_datetime(df.datetime)
df = df.rename(columns={'id': 'secondary'})
df['reference'] = reference
df['reference_acquisition'] = acquisition_time

# FIXME: This duplicates the search parameters... do we still want these filters?
sec_scenes = df[
(acquisition_time.date() > df.datetime.dt.date)
& (df.datetime.dt.date > (acquisition_time.date() - max_pair_separation))
]

sec_scenes = sec_scenes.rename(columns={'id': 'secondary'})
sec_scenes['reference'] = reference
sec_scenes['reference_acquisition'] = acquisition_time

return sec_scenes
return df


# NOTE: Since each newly ingested Landsat scene will become a new unique reference scene, we don't need to look in the
Expand Down

0 comments on commit 656ee0b

Please sign in to comment.