Geocoordinates truncated to 5 decimal places
Description
Environment
centos 7
Acceptance / Success Criteria
None
Lucidchart Diagrams
Activity
Show:

Markus von Rüden January 16, 2018 at 10:32 AM
I had a look at this and it seems that you are right. I created a requisition with a dummy node and coordinates, defined as above:
longitude: -110.5830235
latitude: 44.4182376
Verifying the results in the database:
On the assets page the data is truncated:
longitude: -110.58302
latitude: 44.418236
I investigated the issue and the problem is, that the data is persisted as double, but only read as float.
See https://github.com/OpenNMS/opennms/blob/2ccf1b39b150232ae6bdac3274aefd6c58d1de8f/opennms-model/src/main/java/org/opennms/netmgt/model/OnmsGeolocation.java#L49 for more information
Fixed
Details
Assignee
Markus von RüdenMarkus von Rüden(Deactivated)Reporter
genewgenewSprint
NoneFix versions
Affects versions
Priority
Major
Details
Details
Assignee

Reporter

Sprint
None
Fix versions
Affects versions
Priority
PagerDuty
PagerDuty Incident
PagerDuty
PagerDuty Incident
PagerDuty

PagerDuty Incident
Created January 3, 2018 at 9:48 PM
Updated June 3, 2019 at 7:08 AM
Resolved January 17, 2018 at 3:23 PM
Requisitions with geo-coordinates with city geolocation data with 7 decimal places are truncated to 5 decimal places in the node's asset location and on the regional status map. E.g. 44.4182376, -110.5830235 gets converted to a longitude of -110.58613 and latitude of 44.41949. The city value remains unchanged. While this is close enough for regions, it's way off for adjacent buildings or antenna locations which would be really helpful in a scenario I'm working on. Requisitions continue to hold the correct value after saving and syncing, only the asset information seems to be affected by rounding.
I'm told it's defined as
DOUBLE PRECISION
in theassets
table.Even if we could get the map to read the city value for location and ignore the latitude and longitude values, that would be a nice improvement.