cs2cs fails "Mismatched units" from EPSG:4979 to a vertical offset height (Kumul 34, Kiunga, POM96, POM08)

Aperta
#4,956 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Ambito
data

Direzione di ricerca

Inspect Transformation::_exportToPROJString in singleoperation.cpp, focusing on the Vertical Offset branch and how its unit conversions are ordered after a geoid transformation. Use cs2cs and projinfo with EPSG:4979 and EPSG:7651 to reproduce and inspect the generated pipeline. Done means the affected CRS pairs create a valid pipeline without “Mismatched units” and produce the expected transformed coordinates.

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

Descrizione

PROJ 9.8.1. Transforming from EPSG:4979 to a vertical CRS whose only route is a geoid model followed by a Vertical Offset (method 9616) fails at pipeline creation:

$ echo "-7 143 100" | cs2cs -d 6 EPSG:4979 EPSG:7651
pipeline: Pipeline: Mismatched units between step 4 and 5
*	* inf

Same for EPSG:7652 (Kiunga height), 7832 (POM96 height) and 7841 (POM08 height), through EPSG:7653, 7654, 7873 and 7874.

projinfo -s EPSG:4979 -t EPSG:7651 -o PROJ lists one operation:

+proj=pipeline
  +step +proj=axisswap +order=2,1
  +step +proj=unitconvert +xy_in=deg +xy_out=rad
  +step +inv +proj=vgridshift +grids=us_nga_egm96_15.tif +multiplier=1
  +step +proj=unitconvert +xy_in=rad +xy_out=deg
  +step +proj=axisswap +order=2,1
  +step +proj=geogoffset +dh=-0.87

geogoffset gets degrees after the unitconvert back to degrees. The Vertical Offset branch of Transformation::_exportToPROJString (singleoperation.cpp) adds geogoffset with only the linear unit converts of the two vertical CRSs around it, so nothing restores radians for it when it follows the geoid step.

Moving the offset before the conversion back to degrees gives the expected answer:

$ echo "-7 143 100" | cct -d 6 +proj=pipeline +step +proj=axisswap +order=2,1 \
  +step +proj=unitconvert +xy_in=deg +xy_out=rad \
  +step +inv +proj=vgridshift +grids=us_nga_egm96_15.tif +multiplier=1 \
  +step +proj=geogoffset +dh=-0.87 \
  +step +proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap +order=2,1
     -7.000000      143.000000     22.757052           inf
Lingua principale
C++
Stelle
2k
Fork
918
Merge medio
20h 49m
PR unite (30g)
12

Preparare l'ambiente

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 OSGeo/PROJ

Tutte le issue di OSGeo/PROJ

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.