yixunx commented on PR #756:
URL: https://github.com/apache/lucene/pull/756#issuecomment-1100790763
Hi @iverase it turns out that many of my failed shapes failed because they
contain self-intersections and I set `checkSelfIntersections = true` when
running the tessellator. They do not run into exceptions if I set the flag to
false. I did get one shape that failed with "unable to tessellate" though:
```
{
"type": "Polygon",
"coordinates": [
[
[
33.45959656411607,
-55.440650754647535
],
[
33.45959656411607,
-55.4409285324253
],
[
33.45904100856052,
-55.4409285324253
],
[
33.45904100856052,
-55.441206310203086
],
[
33.458763230782736,
-55.441206310203086
],
[
33.458763230782736,
-55.44231742131419
],
[
33.4593187863383,
-55.44231742131419
],
[
33.4593187863383,
-55.44259519909197
],
[
33.45959656411607,
-55.44259519909197
],
[
33.45959656411607,
-55.44231742131419
],
[
33.45987434189385,
-55.44231742131419
],
[
33.45987434189385,
-55.44259519909197
],
[
33.46015211967163,
-55.44259519909197
],
[
33.46015211967163,
-55.44287297686975
],
[
33.460429897449416,
-55.44287297686975
],
[
33.460429897449416,
-55.44315075464752
],
[
33.46070767522719,
-55.44315075464752
],
[
33.46070767522719,
-55.44287297686975
],
[
33.460985453004966,
-55.44287297686975
],
[
33.460985453004966,
-55.44231742131419
],
[
33.46126323078274,
-55.44231742131419
],
[
33.46126323078274,
-55.44176186575864
],
[
33.460985453004966,
-55.44176186575864
],
[
33.460985453004966,
-55.441206310203086
],
[
33.46126323078274,
-55.441206310203086
],
[
33.46126323078274,
-55.440650754647535
],
[
33.461541008560516,
-55.440650754647535
],
[
33.461541008560516,
-55.44037297686975
],
[
33.4618187863383,
-55.44037297686975
],
[
33.4618187863383,
-55.44009519909197
],
[
33.463207675227196,
-55.44009519909197
],
[
33.463207675227196,
-55.43926186575864
],
[
33.46292989744941,
-55.43926186575864
],
[
33.46292989744941,
-55.43898408798086
],
[
33.46265211967163,
-55.43898408798086
],
[
33.46265211967163,
-55.43926186575864
],
[
33.46070767522719,
-55.43926186575864
],
[
33.46070767522719,
-55.43898408798086
],
[
33.46015211967163,
-55.43898408798086
],
[
33.46015211967163,
-55.43953964353642
],
[
33.45987434189385,
-55.43953964353642
],
[
33.45987434189385,
-55.43981742131419
],
[
33.45959656411607,
-55.43981742131419
],
[
33.45959656411607,
-55.44037297686975
],
[
33.4593187863383,
-55.44037297686975
],
[
33.4593187863383,
-55.440650754647535
],
[
33.45959656411607,
-55.440650754647535
]
],
[
[
33.460985453004966,
-55.4409285324253
],
[
33.460985453004966,
-55.441206310203086
],
[
33.46070767522719,
-55.441206310203086
],
[
33.46070767522719,
-55.4409285324253
],
[
33.460985453004966,
-55.4409285324253
]
],
[
[
33.46070767522719,
-55.44009519909197
],
[
33.46070767522719,
-55.4409285324253
],
[
33.460429897449416,
-55.4409285324253
],
[
33.460429897449416,
-55.44037297686975
],
[
33.45987434189385,
-55.44037297686975
],
[
33.45987434189385,
-55.44009519909197
],
[
33.46070767522719,
-55.44009519909197
]
],
[
[
33.460429897449416,
-55.441206310203086
],
[
33.46070767522719,
-55.441206310203086
],
[
33.46070767522719,
-55.44203964353641
],
[
33.45987434189385,
-55.44203964353641
],
[
33.45987434189385,
-55.44176186575864
],
[
33.460429897449416,
-55.44176186575864
],
[
33.460429897449416,
-55.441206310203086
]
],
[
[
33.45959656411607,
-55.441206310203086
],
[
33.45959656411607,
-55.4409285324253
],
[
33.46015211967163,
-55.4409285324253
],
[
33.46015211967163,
-55.441206310203086
],
[
33.45959656411607,
-55.441206310203086
]
],
[
[
33.460985453004966,
-55.44037297686975
],
[
33.460985453004966,
-55.43981742131419
],
[
33.46126323078274,
-55.43981742131419
],
[
33.46126323078274,
-55.44037297686975
],
[
33.460985453004966,
-55.44037297686975
]
]
]
}
```
I ran it through different tessellator versions using my
[branch](https://github.com/apache/lucene/compare/main...yixunx:yx/reproduce-tessellator-error?expand=1)
and this is the first shape I got that failed in Lucene 8.2.0 (all previous
shapes only failed on Lucene 8.3.0 or higher).
By the way I have a tangential question: the Tessellator javadoc says the
polygon cannot have self-intersections, but it seems that the tessellator runs
fine on shapes with self intersections unless I set `checkSelfIntersections =
true`. Is this expected? What would the tessellator return when I set the flag
to false? (I saw you implemented the flag in
https://github.com/apache/lucene/pull/428 so figured you might have some
context).
--
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]