Commit f8c0c191 authored by Akshat Tandon's avatar Akshat Tandon

Fix for horizontally distorted boundaries between Prime Meridian in Britain and Netherlands

Issue
polyshp2osm.py converter used to write very small lon/lat values in scientific notation. When tiles were created using the osmconvert tool, the tool used to read only the starting digits of the value and never considered the exponenet part, which gave rise to eratic position of nodes and hence eratic boundaries.

Fix
This commit makes the converter write lon/lat values only in decimal notation thus preventing any erratic read/writes.

Reviewers: rahn, nienhueser

Reviewed By: nienhueser

Differential Revision: https://phabricator.kde.org/D2011
parent 7def476d
......@@ -600,9 +600,9 @@ def add_node(num_id, lon, lat, geom_name, f):
def write_node(node):
global open_file
if node[3] == None:
print("<node id='-%s' visible='true' lon='%s' lat='%s' />" % (node[0], node[1], node[2]), end = '\n', file = open_file)
print("<node id='-{}' visible='true' lon='{:.10f}' lat='{:.10f}' />".format(node[0], node[1], node[2]), end = '\n', file = open_file)
else:
print("<node id='-%s' visible='true' lon='%s' lat='%s' >" % (node[0], node[1], node[2]), end = '\n', file = open_file)
print("<node id='-{}' visible='true' lon='{:.10f}' lat='{:.10f}' >".format(node[0], node[1], node[2]), end = '\n', file = open_file)
write_tags(node[3])
print("</node>", end = '\n', file = open_file)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment