Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About Z3 query #28

Open
152056212 opened this issue Mar 5, 2021 · 0 comments
Open

About Z3 query #28

152056212 opened this issue Mar 5, 2021 · 0 comments

Comments

@152056212
Copy link

  1. I do this query : BBOX(geom, 118.180168,24.060873,118.28798,24.149692) AND dtg DURING 2017-01-01T07:14:00+00:00/2017-01-01T08:20:00+00:00
  2. Console log is : createQueryPlan QueryStrategy(Z3Index(geom,dtg)[BBOX(geom, 118.180168,24.060873,118.28798,24.149692) AND dtg DURING 2017-01-01T07:14:00+00:00/2017-01-01T08:20:00+00:00][None],Stream(BoundedByteRange([B@100c567f,[B@30c0d731), ?),Stream(BoundedRange(Z3IndexKey(2452,4299856006940196864),Z3IndexKey(2452,4299856006956974079)), ?),List(),None,Hints:
    org.geotools.util.factory.Hints$ClassKey@325bb9a6 = SimpleFeatureType ais-quickstart ShipName:String,CallSign:String,IMO:String,MMSI:String:cardinality=high,ShipTypeCN:String,ShipTypeEN:String,NavStatusCN:String,NavStatusEN:String,Length:Double,Width:Double,Draught:Double,Heading:Double,Course:String,Speed:String,Lon:String,Lat:String,Rot:String,Dest:String,ETA:String,Receivedtime(UTC+8):String,UnixTime:String,Lon_d:String,Lat_d:String,dtg:Date,*geom:Point:srid=4326
    org.geotools.util.factory.Hints$ClassKey@f478a81 = z3:6:geom:dtg
    System defaults:
    FORCE_LONGITUDE_FIRST_AXIS_ORDER = true
    ,Some(Z3IndexValues(org.locationtech.geomesa.curve.Z3SFC@28fd3dc1,FilterValues(List(POLYGON ((118.180168 24.060873, 118.28798 24.060873, 118.28798 24.149692, 118.180168 24.149692, 118.180168 24.060873))),true,false),List((118.180168,24.060873,118.28798,24.149692)),FilterValues(List([2017-01-01T07:14:01Z,2017-01-01T08:19:59Z]),true,false),Map(2452 -> List((285241,289199))),List())))
  3. And query result is 0, but it is not correct by look for database.
  4. By debug, look this function in package org.locationtech.sfcurve.zorder and abstract class ZN:
    debug

So why output is ( Input is ZRange(4299856006940196864,4299856006956974079)) :
output

  1. And dont understand this function** : /
    • Calculates ranges in index space that match any of the input bounds. Uses breadth-first searching to
    • allow a limit on the number of ranges returned.
    • To improve performance, the following decisions have been made:
    • uses loops instead of foreach/maps
    • uses java queues instead of scala queues
    • allocates initial sequences of decent size
    • sorts once at the end before merging
    • @param zbounds search space
    • @param precision precision to consider, in bits (max 64)
    • @param maxRanges loose cap on the number of ranges to return. A higher number of ranges will have less
    •              false positives, but require more processing.
      
    • @param maxRecurse max levels of recursion to apply before stopping
    • @return ranges covering the search space
      */
      def zranges(zbounds: Array[ZRange],
      precision: Int = 64,
      maxRanges: Option[Int] = None,
      maxRecurse: Option[Int] = Some(ZN.DefaultRecurse)): Seq[IndexRange] = {
      .......
      }`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant