Skip to content

IntLatLngSnapFunction.SnapPoint test failure: +/-180 longitude #596

@jmr

Description

@jmr
[ RUN      ] IntLatLngSnapFunction.SnapPoint
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1777950374.802920  127641 s2latlng.cc:69] Invalid S2LatLng in S2LatLng::ToPoint: [57.1240000, -180.0000000]
E0000 00:00:1777950374.803138  127641 s2latlng.cc:69] Invalid S2LatLng in S2LatLng::ToPoint: [57.1240000, 180.0000000]
/Users/runner/work/s2geometry/s2geometry/src/s2/s2builderutil_snap_functions_test.cc:132: Failure
Expected equality of these values:
  p5
    Which is: [-0.542823, 1.74585e-16, 0.839847]
  IntLatLngSnapFunction(5).SnapPoint(p5)
    Which is: [-0.542823, -1.74585e-16, 0.839847]

[  FAILED  ] IntLatLngSnapFunction.SnapPoint (15 ms)

I see + 1 can put it out of range, but we're having problems with p5 before that.

// Make sure that we're not snapping using some lower exponent.
S2Point p7not6 = S2LatLng::FromE7(10 * ll.lat().e6() + 1,
10 * ll.lng().e6() + 1).ToPoint();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions