neumarcx commented on issue #2219:
URL: https://github.com/apache/jena/issues/2219#issuecomment-1913574848

   > Hi Marco.
   > 
   > Yep, this is indeed no JTS issue but the custom implementation of an 
optimized `CoordinateSequence` which handles Z axis and assumes that this is 
always possible. From what I can see in the JTS code why it happens for 
rectangles, because it's more efficient to evaluate whether an intersection 
exist in that case. It's interesting that it doesn't always fail because in the 
code there are two more check in before checking the line segments of the 
rectangle. We recognized the error only because we added H3 support to the Jena 
spatial layer via property functions, but needed a post filter on a bounding 
box which in fact is a rectangle. It's also lucky that we passed the rectangle 
as first argument, otherwise a different algorithm will be used by JTS.
   > 
   > It's easy to fix in the code I think just adding an `if` condition check 
on the type of the `Coordinate` object (XYZ or not). I'll provide a PR soon.
   
   yes, very good Lorenz, I was able to patch my local copy in 
CustomCoordinateSequence and got it to work as well. I am still wondering about 
side effects. Also the unpatched version seems to work fine with the other 
topological relationships (overlaps, touches, disjoint etc) if isRectangle is 
true. The only call that fails is sfIntersects when the domain of the function 
qualifies as a rectangle.  
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to