Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6A3ADCBE3 for ; Mon, 22 Dec 2014 05:38:43 +0000 (UTC) Received: (qmail 45708 invoked by uid 500); 22 Dec 2014 05:38:40 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 45641 invoked by uid 500); 22 Dec 2014 05:38:40 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Delivered-To: moderator for java-user@lucene.apache.org Received: (qmail 43351 invoked by uid 99); 22 Dec 2014 05:34:30 -0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of prvs=42647befa=Ankit.Murarka@ril.com designates 116.50.78.50 as permitted sender) X-IronPort-AV: E=Sophos;i="5.07,621,1413225000"; d="scan'208,217";a="209320923" From: To: Subject: Lucene Spatial Implementation for Points within Polygon. Thread-Topic: Lucene Spatial Implementation for Points within Polygon. Thread-Index: AdAdqFGGO/uUf+YxR/+edXmzjws8Nw== Date: Mon, 22 Dec 2014 05:30:09 +0000 Message-ID: <0b44876912a44d64ac3e146071b16041@SIDC1EXMBX12.in.ril.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.129.4.40] Content-Type: multipart/alternative; boundary="_000_0b44876912a44d64ac3e146071b16041SIDC1EXMBX12inrilcom_" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org --_000_0b44876912a44d64ac3e146071b16041SIDC1EXMBX12inrilcom_ Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hello Team, We are starting off with Lucene Spatial implementation for some of the use = cases: A . Given "N" polygons and "M" points, find how many points lie inside each= of the polygon. 1st Approach : For A, we indexed Polygons using WKT and using JtsSpatial strategy. I set t= he Level at 22 . This has resulted in huge number of terms. This was needed= as I need the search to be near perfect. For Indexing, I used Point(Supplied as WKT) using Jts again with Level at 2= 2 (Although I think specifying level at query time does not make much diffe= rence). For this, we used ""CONTAINS" . Output is coming but I am not sure if I am= doing it the right way. Need suggestion. I am having following confusion: a. Will CONTAINS and IS WITHIN both work in the same way for the give= n scenario. I am ruling OUT INTERSECTS as that scenario is not appropriate. b. Second, are we missing something in getting the correct output. 2nd Approach : (Reversed) Indexed POINTS in WKT format. Passed Polygons in WKT using JTs as query and fired as INTERSECTS and WITHI= N. In second approach, we are getting more output than the 1st approach. However, we are still not sure which is the best way to tackle this problem= . Please suggest. "Confidentiality Warning: This message and any attachments are intended onl= y for the use of the intended recipient(s). = are confidential and may be privileged. If you are not the intended recipie= nt. you are hereby notified that any = review. re-transmission. conversion to hard copy. copying. circulation or o= ther use of this message and any attachments is = strictly prohibited. If you are not the intended recipient. please notify t= he sender immediately by return email. = and delete this message and any attachments from your system. Virus Warning: Although the company has taken reasonable precautions to ens= ure no viruses are present in this email. = The company cannot accept responsibility for any loss or damage arising fro= m the use of this email or attachment." --_000_0b44876912a44d64ac3e146071b16041SIDC1EXMBX12inrilcom_--