output operator of Esri::ArcGISRuntime::Point

429
3
Jump to solution
03-15-2017 05:54 AM
NorbertThoden
Occasional Contributor III

I create two point and put them to QDebug/qCritical.

But i get unexpected results:

const Viewpoint &vp = mapGeoView->currentViewpoint(ViewpointType::CenterAndScale);
const Point &mapCenter = static_cast<Point>(vp.targetGeometry());

Point myLocation = mapCenter;
Point skyLocation = Esri::ArcGISRuntime::Point(mapCenter.x(), mapCenter.y(), 99999, sr);

qCritical() << " myLocation =" << myLocation << " z=" << myLocation.z();
qCritical() << " skyLocation=" << skyLocation << " z=" << skyLocation.z();

Output:

myLocation= 8.89179 53.0743 5.64578e-316 3.95253e-322  z= 0

myLocation = 8.89179 53.0743 5.64578e-316 3.95253e-322  z= 0

skyLocation= 8.89179 53.0743 5.74185e-316 3.95253e-322  z= 99999

The 1st and 2nd are clear.

The 3rd should be the z-value, right? But why 5.64578e-31?

The 4th is most likely the m-value (3.95253e-322) right?

Thx

0 Kudos
1 Solution

Accepted Solutions
LucasDanzinger
Esri Frequent Contributor

Norbert, this looks like a bug. I think there is some implicit type conversion that is happening. The x and y are correct, and the others are not z or m - they are just wrong. Can you please log a bug through support so that this gets put into the support system? Thanks for reporting! In the meantime, maybe you can use toJson() instead for debugging geometries.

-Lucas

View solution in original post

3 Replies
LucasDanzinger
Esri Frequent Contributor

Norbert, this looks like a bug. I think there is some implicit type conversion that is happening. The x and y are correct, and the others are not z or m - they are just wrong. Can you please log a bug through support so that this gets put into the support system? Thanks for reporting! In the meantime, maybe you can use toJson() instead for debugging geometries.

-Lucas

NorbertThoden
Occasional Contributor III

Hi Luke,

thanks for your information and tip (toJson)

I logged a bug:

  • Esri Support Case Number 01903553.
  • BUG-000103765 : The z and m value of Esri::ArcGISRuntime::Point provides incorrect result.

thx

0 Kudos
NorbertThoden
Occasional Contributor III

Qt 100.4.0:

Qt 100.4.0: Issues resolved

  • BUG-000103765 The << operator outputs incorrect value for Geometries
0 Kudos