nens / threedi-schematisation-editor

QGIS tool for editing schematisations
0 stars 0 forks source link

"Import culverts" processing algorithm #127

Closed leendertvanwolfswinkel closed 1 year ago

leendertvanwolfswinkel commented 1 year ago

Please read #119 first

I propose that before we implement the GUI, we make a processing algorithm that does the same thing. It would work like this:

Inputs

{
  "target_layer": "culvert",
  "conversion_settings": {
    "use_snapping": true,
    "snapping_distance": 0.5,
    "create_connection_nodes": true
  },
  "fields": {
    "id": {
      "method": "auto"
    },
    "code": {
      "method": "source_attribute",
      "source_attribute": "kdu_identificatie",
      "default_value": "duiker (kdu id onbekend)"
    },
    "display_name": {
      "method": "ignore"
    },
    "calculation_type": {
      "method": "source_attribute",
      "source_attribute": "kdu_open",
      "value_map": {
        "ja": "102",
        "nee": "101"
      }
    },
    "discharge_coefficient_positive": {
      "method": "default",
      "default_value": 0.8
    }   
  }
}

Outputs

Algorithm See #119

leendertvanwolfswinkel commented 1 year ago

I have tested this, using this example data: https://app.zenhub.com/files/481141268/b0b34642-e95b-48a8-9fbe-94bfbf5e6c82/download

Test results:

ldebek commented 1 year ago

Fixes applied.

leendertvanwolfswinkel commented 1 year ago

Great, I think the main things are there now. Some smaller issues (I hope):

ldebek commented 1 year ago

@leendertvanwolfswinkel Fixes for the above issues applied.

leendertvanwolfswinkel commented 1 year ago

Great! Let's merge this