ngageoint / opensphere

OpenSphere

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gx:LatLonQuad should discard altitude values

wisestmumbler opened this issue · comments

Have an issue where a third party provides a gx:LatLonQuad with coordinates with altitude but we don't discard them. Farther down we check that the length of the coordinate is 2 (but it fails because altitude is still in there).

See
https://github.com/ngageoint/opensphere/blob/master/src/plugin/file/kml/kml.js#L656
https://github.com/ngageoint/opensphere/blob/master/src/os/geo/geo.js#L1426
https://github.com/ngageoint/opensphere/blob/master/src/os/geo/geo.js#L1670

https://developers.google.com/kml/documentation/kmlreference#gx:latlonquad

If a third value is inserted into any tuple (representing altitude) it will be ignored. Altitude is set using and (or gx:altitudeMode) extending . Allowed altitude modes are absolute, clampToGround, and clampToSeaFloor.