You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by nk...@apache.org on 2023/03/14 14:16:11 UTC
[lucene] branch main updated: Remove the Now Unused Class `pointInPolygon`. (#12159)
This is an automated email from the ASF dual-hosted git repository.
nknize pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git
The following commit(s) were added to refs/heads/main by this push:
new dfd9e0fe979 Remove the Now Unused Class `pointInPolygon`. (#12159)
dfd9e0fe979 is described below
commit dfd9e0fe97966b90ac4d09206d706427eeba72b7
Author: Marcus <ma...@gmail.com>
AuthorDate: Tue Mar 14 07:16:02 2023 -0700
Remove the Now Unused Class `pointInPolygon`. (#12159)
Removes the unused Tessellator.pointInPolygon method.
---
lucene/CHANGES.txt | 2 ++
.../core/src/java/org/apache/lucene/geo/Tessellator.java | 15 ---------------
2 files changed, 2 insertions(+), 15 deletions(-)
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index fafb9b093af..62b91852e5d 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -144,6 +144,8 @@ Improvements
* GITHUB#12175: Remove SortedSetDocValuesSetQuery in favor of TermInSetQuery with DocValuesRewriteMethod. (Greg Miller)
+* GITHUB#12166: Remove the now unused class pointInPolygon. (Marcus Eagan via Christine Poerschke and Nick Knize)
+
Optimizations
---------------------
diff --git a/lucene/core/src/java/org/apache/lucene/geo/Tessellator.java b/lucene/core/src/java/org/apache/lucene/geo/Tessellator.java
index 5179037fa54..5d5835728e6 100644
--- a/lucene/core/src/java/org/apache/lucene/geo/Tessellator.java
+++ b/lucene/core/src/java/org/apache/lucene/geo/Tessellator.java
@@ -1438,21 +1438,6 @@ public final class Tessellator {
}
}
- /**
- * Brute force compute if a point is in the polygon by traversing entire triangulation todo: speed
- * this up using either binary tree or prefix coding (filtering by bounding box of triangle)
- */
- public static final boolean pointInPolygon(
- final List<Triangle> tessellation, double lat, double lon) {
- // each triangle
- for (int i = 0; i < tessellation.size(); ++i) {
- if (tessellation.get(i).containsPoint(lat, lon)) {
- return true;
- }
- }
- return false;
- }
-
/**
* Implementation of this interface will receive calls with internal data at each step of the
* triangulation algorithm. This is of use for debugging complex cases, as well as gaining insight