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

Develop #48

Merged
merged 2 commits into from
Oct 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion eo_validation/validation_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,12 +756,21 @@ def create_property_widgets(self, properties):

def changed_checked_widget(b):

# compute seconds per point taken
self._seconds_per_point = round(
time.time() - self._current_time, 4)

# update date of validated point
self._feature['properties']['date'] = str(pd.Timestamp.now())

# update seconds per point taken
self._feature['properties']['seconds_taken'] = \
self._seconds_per_point
self._feature['properties']['verified'] = True

# Update the properties with the new values
for widget in self.property_widgets:
self._feature['properties'][widget._property_key] = \
widget.value

# updating the information with new data
self.geo_data_layer.geo_dataframe.loc[
Expand Down Expand Up @@ -798,6 +807,7 @@ def on_click_polygon_object(self, event, feature, **kwargs):
# Dynamically create input widgets for each property
self.property_widgets = self.create_property_widgets(
self._feature['properties'])

save_button = widgets.Button(description="Save")
geom_type = self._feature['geometry']['type']
centroid = self.calculate_centroid(
Expand Down Expand Up @@ -829,6 +839,7 @@ def save_changes(_):

original_data = copy.deepcopy(self.geo_data_layer.data)
original_feature = copy.deepcopy(self._feature)

# Update the properties with the new values
for widget in self.property_widgets:
self._feature['properties'][widget._property_key] = \
Expand Down
Loading