On Tue, Nov 3, 2020 at 1:50 PM Marcus Eagan <[email protected]> wrote:
> @David Smiley <[email protected]> It would seem to me that > TestSpatialFilter would be fine with no mention of the port in the name. > It's a confusing identifier. > Feel free to propose a better name and file a PR. It's lineage (origins from Solr) is however useful information that should stay as a comment. > As for TestGeo3dShapeWGS84ModelRectRelation, there are lots of comments. > > Not sure what the value of this comment is in the class > > /* > [junit4] 1> S-R Rel: {}, Shape {}, Rectangle {} lap# {} [CONTAINS, > Geo3dShape{planetmodel=PlanetModel: {xyScaling=1.0011188180710464, > zScaling=0.9977622539852008}, shape=GeoPath: {planetmodel=PlanetModel: > {xyScaling=1.0011188180710464, zScaling=0.9977622539852008}, > width=1.53588974175501(87.99999999999999), > points={[[X=0.12097657665150223, Y=-0.6754177666095532, > Z=0.7265376136709238], [X=-0.3837892785614207, Y=0.4258049113530899, > Z=0.8180007850434892]]}}}, > Rect(minX=4.0,maxX=36.0,minY=16.0,maxY=16.0), 6981](no slf4j subst; sorry) > [junit4] FAILURE 0.59s | Geo3dWGS84ShapeRectRelationTest.testGeoPathRect <<< > [junit4] > Throwable #1: java.lang.AssertionError: > Geo3dShape{planetmodel=PlanetModel: {xyScaling=1.0011188180710464, > zScaling=0.9977622539852008}, shape=GeoPath: {planetmodel=PlanetModel: > {xyScaling=1.0011188180710464, zScaling=0.9977622539852008}, > width=1.53588974175501(87.99999999999999), > points={[[X=0.12097657665150223, Y=-0.6754177666095532, > Z=0.7265376136709238], [X=-0.3837892785614207, Y=0.4258049113530899, > Z=0.8180007850434892]]}}} intersect Pt(x=23.81626064835212,y=16.0) > [junit4] > at > __randomizedtesting.SeedInfo.seed([2595268DA3F13FEA:6CC30D8C83453E5D]:0) > [junit4] > at > org.apache.lucene.spatial.spatial4j.RandomizedShapeTestCase._assertIntersect(RandomizedShapeTestCase.java:168) > [junit4] > at > org.apache.lucene.spatial.spatial4j.RandomizedShapeTestCase.assertRelation(RandomizedShapeTestCase.java:153) > [junit4] > at > org.apache.lucene.spatial.spatial4j.RectIntersectionTestHelper.testRelateWithRectangle(RectIntersectionTestHelper.java:128) > [junit4] > at > org.apache.lucene.spatial.spatial4j.Geo3dWGS84ShapeRectRelationTest.testGeoPathRect(Geo3dWGS84ShapeRectRelationTest.java:265) > */ > > That shows log/error output of the failure that was ultimately fixed. > This comment either. It just seems like these are stream of conscious notes > and maybe they should be captured in the relevant tickets, which could be > referenced. Do you think it should be in the actual source code? > > // Rectangle contains point > //assertTrue(rect.isWithin(pt)); > // Path contains point (THIS FAILS) > //assertTrue(path.isWithin(pt)); > // What happens: (1) The center point of the horizontal line is within the > path, in fact within a radius of one of the endpoints. > // (2) The point mentioned is NOT inside either SegmentEndpoint. > // (3) The point mentioned is NOT inside the path segment, either. (I think > it should be...) > > > I suppose... I'm not sure 5 years later.
