Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

DfsuBuilder writes a metre quantity for X/Y static items even in geographic projections (disabled block at DfsuBuilder.py:524)

Aperta
#47 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Inizia da mikecore/DfsuBuilder.py:521-528 e ispeziona gli helper di proiezione già esposti in Projections.py. Riproduci il caso LONG/LAT descritto nell’issue, quindi determina se il blocco disabilitato delle quantità geografiche fosse intenzionale o sia rimasto lì. Il lavoro è completo quando la decisione di compatibilità è esplicita e il comportamento della quantity di X/Y static-item è stato verificato in base a tale decisione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

mikecore/DfsuBuilder.py:521-528 sets the quantity used for the X-coord and Y-coord static items, with the geographic case commented out:

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.

Lingua principale
Python
Stelle
5
Fork
1
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di DHI/mikecore-python

Tutte le issue di DHI/mikecore-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.