OnroerendErfgoed / brdr

BRDR - a Python library to assist in realigning (multi-)polygons (OGC Simple Features) to reference borders
MIT License
4 stars 0 forks source link

refactoring of 'formula-unction': generic vs GRB #59

Closed dieuska closed 1 month ago

dieuska commented 1 month ago

At the moment we have a aligner.get_formula()-function that transforms a geometry in a json-discription of the geometry based on all the reference-geometries. This can be used generic.

Example of the current formula-structure: image

As we notice, when using this formula for GRB-purposes we need to enrich this formula with GRB-specific attributes (f.e. version_date)

So at the moment the formula-function-code becomes a mix between generic and GRB-specific elements What would be the best structure to seperate the generic from the GRB-specific so it is more future-proof?

dieuska commented 1 month ago

@roefem : what is your idea about this?

roefem commented 1 month ago

You could add an extend_formula method to the Loader classes, which extends the formula dictionary with loader-specific properties.