DfsuBuilder writes a metre quantity for X/Y static items even in geographic projections (disabled block at DfsuBuilder.py:524)
- Vorherrschende Sprache
- Python
- Sterne
- 5
- Forks
- 1
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
`mikecore/DfsuBuilder.py:521-528` sets the quantity used for the `X-coord` and `Y-coord` static items, with the geographic case commented out:
```python
xyQuantity = eumQuantity(eumItem.eumIGeographicalCoordinate, eumUnit.eumUmeter)
# TODO: reenable:
#if (MapProjection.IsValid(self.__dfsProjection.WKTString)):
# if (MapProjection.IsGeographical(self.__dfsProjection.WKTString)):
# xyQuantity = eumQuantity(eumItem.eumILatLong, eumUnit.eumUdegree)
```
As it stands, every dfsu written by `DfsuBuilder` gets `eumIGeographicalCoordinate` in metre for its X/Y static items — including files whose projection is geographic. For a `LONG/LAT` file the coordinates in those items are degrees, so the recorded unit is wrong: the disabled block is exactly what would have set `eumILatLong`/`eumUdegree` instead.
Reproduction: build a dfsu with `SetProjection` given the `LONG/LAT` WKT, write it, then read back the `X-coord` static item and inspect its quantity — it reports metre.
`Projections.py` already exposes the projection-inspection needed to re-enable this, so the question is whether the block was disabled for a reason (a dependency that was not ported, or a deliberate compatibility choice) or simply left behind. Not fixed here — writing a different quantity into files changes output, and that decision should be explicit.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne bei mikecore/DfsuBuilder.py:521-528 und untersuche die in Projections.py bereits bereitgestellten Projektions-Hilfsfunktionen. Reproduziere den im Issue beschriebenen LONG/LAT-Fall und ermittle anschließend, ob der deaktivierte Block für geografische Größen absichtlich so war oder zurückgeblieben ist. Erledigt ist die Aufgabe, wenn die Kompatibilitätsentscheidung explizit ist und das Verhalten der X/Y-static-item-Quantity anhand dieser Entscheidung verifiziert wurde.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- backend
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 48/100