YongGoose commented on PR #948:
URL: 
https://github.com/apache/incubator-baremaps/pull/948#issuecomment-2676255029

   > @YongGoose I think it is a great start. I havn't used the 
`GeometryCombiner` yet, but according to the javadoc it looks like the right 
tool.
   > 
   > From what I understand, the `RelationBoundaryBuilder` consumer handles all 
relation regardless of their tags. It may be a good idea to add an early return 
in the accept method for relations that don't have the `boundary` tag. 
Similarly, it may be a good to add an early return for the relations that have 
the `boundary` tag in the `RelationMultiPolygonBuilder`. Using this approach, 
we should then be able to chain the `Consumer`s with the `.andThen` method 
while ensuring that they don't interfer with each others.
   
   Thanks for the feedback!
   
   Based on your suggestion, I implemented chaining multiple Consumers using 
.andThen to ensure they don’t interfere with each other.
   
   Now, the test is failing in `OsmDataTest`, and I'm not sure how to modify 
the code to fix it yet. I would really appreciate your help.
   ```
   org.opentest4j.AssertionFailedError: 950: Multipolygon with one outer and 
one inner ring, tags on relation, type boundary.
   Expected:
   POLYGON ((9.01 1.51, 9.01 1.59, 9.09 1.59, 9.09 1.51, 9.01 1.51), (9.03 
1.53, 9.03 1.57, 9.07 1.57, 9.07 1.53, 9.03 1.53))
   Actual:
   GEOMETRYCOLLECTION (GEOMETRYCOLLECTION (POLYGON ((9.01 1.51, 9.01 1.59, 9.09 
1.59, 9.09 1.51, 9.01 1.51)), LINESTRING (9.03 1.53, 9.03 1.57, 9.07 1.57), 
LINESTRING (9.07 1.57, 9.07 1.53, 9.03 1.53))) ==> 
   Expected :true
   Actual   :false
   <Click to see difference>
   
   
        at 
org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
        at 
org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
        at org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63)
        at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36)
        at org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:214)
        at 
org.apache.baremaps.openstreetmap.OsmDataTest.runTest(OsmDataTest.java:132)
        at 
org.apache.baremaps.openstreetmap.OsmDataTest.lambda$createDynamicTest$1(OsmDataTest.java:72)
        at java.base/java.util.Optional.ifPresent(Optional.java:178)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to