This is an automated email from the ASF dual-hosted git repository.

bchapuis pushed a commit to branch 745-daylight
in repository https://gitbox.apache.org/repos/asf/incubator-baremaps.git


The following commit(s) were added to refs/heads/745-daylight by this push:
     new eacecfc4 Fix lon/lat inversion in change reader
eacecfc4 is described below

commit eacecfc4a8a78648e573213339625ac75b3d6a40
Author: Bertil Chapuis <[email protected]>
AuthorDate: Sun Oct 29 17:22:08 2023 +0100

    Fix lon/lat inversion in change reader
---
 .../org/apache/baremaps/openstreetmap/xml/XmlChangeSpliterator.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/baremaps-core/src/main/java/org/apache/baremaps/openstreetmap/xml/XmlChangeSpliterator.java
 
b/baremaps-core/src/main/java/org/apache/baremaps/openstreetmap/xml/XmlChangeSpliterator.java
index dbb6b9b7..9830d5ba 100644
--- 
a/baremaps-core/src/main/java/org/apache/baremaps/openstreetmap/xml/XmlChangeSpliterator.java
+++ 
b/baremaps-core/src/main/java/org/apache/baremaps/openstreetmap/xml/XmlChangeSpliterator.java
@@ -155,8 +155,8 @@ public class XmlChangeSpliterator implements 
Spliterator<Change> {
   private Node readNode() throws XMLStreamException {
     long id = Long.parseLong(reader.getAttributeValue(null, 
ATTRIBUTE_NAME_ID));
     Info info = readInfo();
-    double latitude = Double.parseDouble(reader.getAttributeValue(null, 
ATTRIBUTE_NAME_LATITUDE));
-    double longitude = Double.parseDouble(reader.getAttributeValue(null, 
ATTRIBUTE_NAME_LONGITUDE));
+    double lat = Double.parseDouble(reader.getAttributeValue(null, 
ATTRIBUTE_NAME_LATITUDE));
+    double lon = Double.parseDouble(reader.getAttributeValue(null, 
ATTRIBUTE_NAME_LONGITUDE));
 
     // read the content of the node
     Map<String, Object> tags = new HashMap<>();
@@ -172,7 +172,7 @@ public class XmlChangeSpliterator implements 
Spliterator<Change> {
       }
     }
 
-    return new Node(id, info, tags, latitude, longitude);
+    return new Node(id, info, tags, lon, lat);
   }
 
   private Way readWay() throws XMLStreamException {

Reply via email to