Package com.browseengine.bobo.facets.impl.GeoFacetCountCollector

Examples of com.browseengine.bobo.facets.impl.GeoFacetCountCollector.GeoRange


   * @param selectionProperty
   */
  @Override
  public RandomAccessFilter buildRandomAccessFilter(String value, Properties selectionProperty)
      throws IOException {
    GeoRange range = GeoFacetCountCollector.parse(value);
    SpatialArgs spatialArgs = new SpatialArgs(SpatialOperation.Intersects,
        SpatialContext.GEO.makeCircle(range.getLon(), range.getLat(),
          DistanceUtils.dist2Degrees(range.getRad(), DistanceUtils.EARTH_MEAN_RADIUS_KM)));
    Filter filter = spatialStrategy.makeFilter(spatialArgs);
    if (filter == null) {
      return null;
    }
    return new SpatialFacetFilter(filter);
View Full Code Here


   * @param selectionProperty
   */
  @Override
  public RandomAccessFilter buildRandomAccessFilter(String value,
      Properties selectionProperty) throws IOException {
    GeoRange range = GeoFacetCountCollector.parse(value);
    return new GeoFacetFilter(this, range.getLat(), range.getLon(), range.getRad(), _miles);
  }
View Full Code Here

      this.lonEnd = lonEnd;
      this.radius = radius;
    }
   
    public static GeoLatLonRange parse(String val){
      GeoRange range = GeoFacetCountCollector.parse(val);
      float latStart = range.getLat() - range.getRad();
      float latEnd = range.getLat() + range.getRad();
      float lonStart = range.getLon() - range.getRad();
      float lonEnd = range.getLon() + range.getRad();
     
      StringBuilder buf = new StringBuilder();
      buf.append("[").append(String.valueOf(latStart)).append(" TO ").append(String.valueOf(latEnd)).append("]");
      String latRange = buf.toString();
     
      buf = new StringBuilder();
      buf.append("[").append(String.valueOf(lonStart)).append(" TO ").append(String.valueOf(lonEnd)).append("]");
      String lonRange = buf.toString();
     
      return new GeoLatLonRange(latRange,lonRange,latStart,latEnd,lonStart,lonEnd,range.getRad());
    }
View Full Code Here

   * @param selectionProperty
   */
  @Override
  public RandomAccessFilter buildRandomAccessFilter(String value, Properties selectionProperty)
      throws IOException {
    GeoRange range = GeoFacetCountCollector.parse(value);
    return new GeoFacetFilter(this, range.getLat(), range.getLon(), range.getRad(), _miles);
  }
View Full Code Here

      this.lonEnd = lonEnd;
      this.radius = radius;
    }

    public static GeoLatLonRange parse(String val) {
      GeoRange range = GeoFacetCountCollector.parse(val);
      float latStart = range.getLat() - range.getRad();
      float latEnd = range.getLat() + range.getRad();
      float lonStart = range.getLon() - range.getRad();
      float lonEnd = range.getLon() + range.getRad();

      StringBuilder buf = new StringBuilder();
      buf.append("[").append(String.valueOf(latStart)).append(" TO ")
          .append(String.valueOf(latEnd)).append("]");
      String latRange = buf.toString();

      buf = new StringBuilder();
      buf.append("[").append(String.valueOf(lonStart)).append(" TO ")
          .append(String.valueOf(lonEnd)).append("]");
      String lonRange = buf.toString();

      return new GeoLatLonRange(latRange, lonRange, latStart, latEnd, lonStart, lonEnd,
          range.getRad());
    }
View Full Code Here

TOP

Related Classes of com.browseengine.bobo.facets.impl.GeoFacetCountCollector.GeoRange

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.