You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Within the same loop, I am querying data with two different mapper_configs in which everything is the same except for the feature (one is original size, one is buffered with 25m). Is this possible, or are some variables within the MapperConfigs defined globally and thus overwritten by the second definition of the mapper_configs?
I'm asking because the shape of the output feature without the buffer does not correspond to the input feature without buffer..
mapper_configs = MapperConfigs(
collection = collection,
time_start = date_vec[i],
time_end = date_vec[i+1],
feature = feature,
metadata_filters = metadata_filters
)
mapper_configs_buffer = MapperConfigs(
collection = collection,
time_start = date_vec[i],
time_end = date_vec[i+1],
feature = feature_buffer,
metadata_filters = metadata_filters
)
# Create mapper
mapper = Mapper(mapper_configs)
mapper_buffer = Mapper(mapper_configs_buffer)
try:
mapper.query_scenes()
mapper_buffer.query_scenes()
except Exception as e:
# if no images available are found skip to the next data chunk
if e.args[0] == "Querying STAC catalog failed: 'sensing_time'":
print('No images found, continuing to the next data chunk')
n = n+1 # update counter
np.save(DATA_PATH + '/counter.npy', n)
continue # skip this data chunk download
else:
print(e)
break
# download the images
mapper.load_scenes(scene_kwargs=scene_kwargs)
mapper_buffer.load_scenes(scene_kwargs=scene_kwargs)
# display image headers
mapper.data
mapper_buffer.data
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Within the same loop, I am querying data with two different mapper_configs in which everything is the same except for the feature (one is original size, one is buffered with 25m). Is this possible, or are some variables within the MapperConfigs defined globally and thus overwritten by the second definition of the mapper_configs?
I'm asking because the shape of the output feature without the buffer does not correspond to the input feature without buffer..
Beta Was this translation helpful? Give feedback.
All reactions