You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 27, 2024. It is now read-only.
Hi,
my application must display some lines from a map file. I load the lines data using the MapDatabase class and add these lines to the map using a VectorTileLayer. The lines plotted are not precise, in fact two parallel lines are shown oblique.
This problem is caused when the application reads the line points from the map file and stores them in the GeometryBuffer. The line point coordinates (longitude and latitude) are stored in the map file in unsigned int that is the value in microdegrees. When the application collects these coordinates, it stores them in the GeometryBuffer points variable, that is a float array. Converting the unsigned Int coordinates collected to float some points lose significant digit, causing errors of about 40 cm in the points plotting.
This problem is not present in the mapsforge that stores the points in a double variable.
So I tried to solve this issue declaring the GeometryBuffer points variable as an array of double and adapting the code to this change. I have resolve this issue but the application reacts slower and has an other problem plotting dashed lines.
Has someone already encountered this problem?
Can someone help me?
Is there a smarter way to solve this issue?
Thanks in advance.
The text was updated successfully, but these errors were encountered:
Hi,
I have the same problem, the java Floating variable doesn't have enough digits to represent the mantissa. In fact, the casting of an unsigned int in a float causes the loss of the last significant digits. Has someone an idea to increase the mantissa of a java float?...Is there a smart solution to avoid this casting issue in the vtm?
Hi,
my application must display some lines from a map file. I load the lines data using the MapDatabase class and add these lines to the map using a VectorTileLayer. The lines plotted are not precise, in fact two parallel lines are shown oblique.
This problem is caused when the application reads the line points from the map file and stores them in the GeometryBuffer. The line point coordinates (longitude and latitude) are stored in the map file in unsigned int that is the value in microdegrees. When the application collects these coordinates, it stores them in the GeometryBuffer points variable, that is a float array. Converting the unsigned Int coordinates collected to float some points lose significant digit, causing errors of about 40 cm in the points plotting.
This problem is not present in the mapsforge that stores the points in a double variable.
So I tried to solve this issue declaring the GeometryBuffer points variable as an array of double and adapting the code to this change. I have resolve this issue but the application reacts slower and has an other problem plotting dashed lines.
Has someone already encountered this problem?
Can someone help me?
Is there a smarter way to solve this issue?
Thanks in advance.
The text was updated successfully, but these errors were encountered: