Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-2874

Add support for polygon-based searches

    Details

    • Type: Story
    • Status: To Do
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: Qserv
    • Labels:
      None

      Description

      Qserv should support the following type of queries:

      -- Create a binary representation of the search polygon
      SET @poly = scisql_s2CPolyToBin(359.9601, 2.5952,
                                     0.0398, 2.5952,
                                     0.0398, 2.6748,
                                     359.9601, 2.6748);
       
      -- Compute HTM ID ranges for the level 20 triangles overlapping
      -- @poly. They will be stored in a temp table called scisql.Region
      -- with two columns, htmMin and htmMax
      CALL scisql.scisql_s2CPolyRegion(@poly, 20);
       
      -- Select reference objects inside the polygon. The join against
      -- the HTM ID range table populated above cuts down on the number of
      -- SimRefObject rows that need to be tested against the polygon
      SELECT refObjectId, isStar, ra, decl, rMag
      FROM SimRefObject AS sro INNER JOIN
          scisql.Region AS r ON (sro.htmId20 BETWEEN r.htmMin AND r.htmMax)
      WHERE scisql_s2PtInCPoly(ra, decl, @poly) = 1;
      

      This 3-step process can be hidden inside qserv, without exposing it to user. Ideally, we should be able to run it behind the scene, and avoid changing/extending the existing API between user and the proxy

      This story has been transfered from https://dev.lsstcorp.org/trac/ticket/2056

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                fritzm Fritz Mueller
                Watchers:
                Fritz Mueller, Gregory Dubois-Felsmann, Jacek Becla, Serge Monkewitz
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Summary Panel