QGEP / qgepqwat2ili

3 stars 3 forks source link

qgepqwat2ili: exported labels' TID are no standardoid #132

Closed cymed closed 5 months ago

cymed commented 11 months ago

Describe the bug When exporting a Model including labels, the labels have a purely numerical TID .

To Reproduce Exact steps to reproduce the behavior:

  1. Export an xtf with labels through the GUI
  2. Check a feature's TID in class 'xx_Text'
  3. TID is numeric

Expected behavior TID is a valid standardoid as required by SIA405_Base. My take on this would be:

  1. Separate the label export from the interlis export 1.1. Add a DB- side view tww_od.vw_text for import and export 1.2. Add a UI to import labels into tww_od.txt_text and the corresponding specialised table (i.e. tww_od.reach_text) 1.3 Potential problem: We are currently limited to 1 million OID per class, see https://github.com/QGEP/QGEP/discussions/764. When we truncate and re-import the labels every time we want to make an export, this might be reached quite fast
  2. Altering the export scripts to use the label positions in the database instead of the ones in the QGIS project. Importing the labels into

Screenshots / data grafik

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

sjib commented 11 months ago

@cymed

cymed commented 11 months ago

I get no validation errors from ilivalidator, but the canton of Aargau requires all tids to be standardoids according to an extended validation check (relevant for AG64/96 gateway that is in the planning)

sjib commented 11 months ago

But label_position are a "waste" product that will change with a next data delivery and cannot be maintained - so this makes no sense to me to set a stable OID there.

cymed commented 11 months ago

I agree conceptually, but as long as some cantonal offices require stable oid, the engineering companies must deliver them.

cymed commented 11 months ago

An alternative would be to add the labels to mapping.py and decide on the population mechanism (from db or from geojson) by a flag

sjib commented 5 months ago

@cymed Do we still have to solve this in qgep? Else please close and add issue to tww

cymed commented 5 months ago

Is solved already in tww. Closing here