From dev-return-311491-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Tue Feb 13 09:58:12 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 67E65180656 for ; Tue, 13 Feb 2018 09:58:12 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 57A82160C53; Tue, 13 Feb 2018 08:58:12 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A2BB8160C50 for ; Tue, 13 Feb 2018 09:58:11 +0100 (CET) Received: (qmail 97843 invoked by uid 500); 13 Feb 2018 08:58:05 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 97825 invoked by uid 99); 13 Feb 2018 08:58:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Feb 2018 08:58:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id AD2EDC1BA3 for ; Tue, 13 Feb 2018 08:58:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.311 X-Spam-Level: X-Spam-Status: No, score=-110.311 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id lW5WB03riiSk for ; Tue, 13 Feb 2018 08:58:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 3AC2F5F398 for ; Tue, 13 Feb 2018 08:58:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 75994E00D5 for ; Tue, 13 Feb 2018 08:58:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 35AB521E83 for ; Tue, 13 Feb 2018 08:58:00 +0000 (UTC) Date: Tue, 13 Feb 2018 08:58:00 +0000 (UTC) From: "Ignacio Vera (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LUCENE-8126) Spatial prefix tree based on S2 geometry MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LUCENE-8126?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D163= 62014#comment-16362014 ]=20 Ignacio Vera commented on LUCENE-8126: -------------------------------------- [~jpountz], the important thing here is if the shape is close to the equato= r and close to the poles. When using bounding boxes, the further away you a= re from the equator, the more cells you need to describe a shape. S2 cells = are more constant around the globe so it should use the similar number of c= ells regardless where you are on the sphere. I put together an example (attached) where I index a square polygon on the = equator and at a 60 degrees latitude with trees with same set-up. You can s= ee that geohash tree is the more inneficient as it needs quite a lot of cel= ls to describe the polygon, 260 at the equator and 390 at 60 degrees. S2 an= d Quad trees use the same number of cells to describe the polygon at the eq= uator (108) but at 60 degrees, S2 uses a similar number of cells=C2=A0 and = Quad tree almost double the number of cells required. Here is where the ben= efit comes. I have attached as well a small graph showing query performance of my data = depending on the SPT. The queries use composite strategy and are random con= e searches (query shape is a random circle). Horizontal axis represents the= number of hits of the query and the vertical axis the query execution time= . =C2=A0 =C2=A0 > Spatial prefix tree based on S2 geometry > ---------------------------------------- > > Key: LUCENE-8126 > URL: https://issues.apache.org/jira/browse/LUCENE-8126 > Project: Lucene - Core > Issue Type: New Feature > Components: modules/spatial-extras > Reporter: Ignacio Vera > Assignee: Ignacio Vera > Priority: Major > Attachments: SPT-query.jpeg, STP-cell.pdf > > Time Spent: 0.5h > Remaining Estimate: 0h > > Hi [~dsmiley], > I have been working on a prefix tree based on goggle S2 geometry (https:/= /s2geometry.io/) to be used mainly with Geo3d shapes with very promising re= sults, in particular for complex shapes (e.g polygons). Using this pixeliza= tion scheme reduces the size of the index, improves the performance of the = queries and reduces the loading time for non-point shapes.=20 > If you are ok with this contribution and before providing any code I woul= d like to understand what is the correct/prefered approach: > 1) Add new depency to the S2 library (https://mvnrepository.com/artifact/= io.sgr/s2-geometry-library-java). It has Apache 2.0 license so it should be= ok. > 2) Create a utility class with all methods necessary to navigate the S2 t= ree and create shapes from S2 cells (basically port what we need from the l= ibrary into Lucene). > What do you think? -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org