Skip to content

Conversation

@0xmycf
Copy link
Contributor

@0xmycf 0xmycf commented May 16, 2025

Allows for changing the Measurements in the LoadingInformation for Gdal and Ogr Sources.

GdalSources

gdalsources

OgrSources

ogrsources

Currently the class values for the classification measurement are typed for integers other input is not allowed.
I think this makes it impossible for declaring a proper classification measurement for text or float columns.

I did not implement this in the frontend yet, as I've seen that the backend defines the type as

pub struct ClassificationMeasurement {
    pub measurement: String,
    pub classes: HashMap<u8, String>,
}

and I am not 100% sure if this should be even possible.

Changes I've made

Measurement Component

  • The MeasurementComponent has been made a standalone component. I made this change, because I got a cyclic import problem with using the MeasurementComponent in the OgrDatasetComponent.
  • A new @Output() onInputChange = new EventEmitter<Event>(); that fires every time one of the text input fields changes (used to mark the form as dirty)
  • @Output() measurementChange = new EventEmitter<Measurement>(); now fires after measurement changes (didnt fire at all before)
  • change constructor to ngOnChange and setup the measurement appropriately if one is given as @Input

GdalMetadataListComponent and OgrDatasetComponent

  • both now have a child MeasurementComponent

OgrDatasetComponent

  • holds additional info about the columns in the Dataset
  • tracks which dataset's measurement was edited last and which is being currently edited (to properly save the new measurement`
  • now implements OnInit to setup the currently selected column for the measurement component

@CLAassistant
Copy link

CLAassistant commented May 16, 2025

CLA assistant check
All committers have signed the CLA.

@dbrandenstein
Copy link
Contributor

Measurement Editing

@dbrandenstein dbrandenstein changed the title Measurement editing feat(manager): measurement editing May 22, 2025
<input matInput type="text" formControlName="spatialReference" />
</mat-form-field>

<mat-form-field class="column">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you include some sort of indication in the UI that this section is meant for setting the measurement? Alternatively, would it maybe make sense to have the "geoengine-measurement" appear directly below the "Integer Columns" etc. fields when one clicks on a column name/enters a new one there? It might be more intuitive to have it directly there, associated with the column definition and would be neat to have it only appear when actively editing the column names this way and hidden otherwise.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commit

I could change it s.t. the measurement appears underneath the selected column. However I would need to track which column is selected etc. ..a little bit more code.

</mat-form-field>

<ng-container *ngIf="metaData as meta">
<geoengine-measurement
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to add an indication that the measurement is set in this section

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@0xmycf
Copy link
Contributor Author

0xmycf commented Jun 11, 2025

We discussed this elsewhere, but this is the commit, relating to the idea to filter out the text columns from the classification
commit

@0xmycf
Copy link
Contributor Author

0xmycf commented Jun 18, 2025

First one: commit

We talked about this in private. The resultDescriptor should be re-fetched after the loading info has been updated.

Second one: commit

The units are now shown for each band / column.

screenshot

@0xmycf 0xmycf force-pushed the measurement_editing branch from 6c86579 to cfcd2a5 Compare August 26, 2025 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants