Examples of CartesianTierPlotter


Examples of org.apache.lucene.spatial.tier.projections.CartesianTierPlotter

 
 
  private void setUpPlotter(int base, int top) {
   
    for (; base <= top; base ++){
      ctps.add(new CartesianTierPlotter(base,project,
          CartesianTierPlotter.DEFALT_FIELD_PREFIX));
    }
  }
View Full Code Here

Examples of org.apache.lucene.spatial.tier.projections.CartesianTierPlotter

    // add a default meta field to make searching all documents easy
    doc.add(new Field("metafile", "doc",Field.Store.YES, Field.Index.ANALYZED));
   
    int ctpsize = ctps.size();
    for (int i =0; i < ctpsize; i++){
      CartesianTierPlotter ctp = ctps.get(i);
      doc.add(new Field(ctp.getTierFieldName(),
          NumericUtils.doubleToPrefixCoded(ctp.getTierBoxId(lat,lng)),
          Field.Store.YES,
          Field.Index.NOT_ANALYZED_NO_NORMS));
     
      doc.add(new Field(geoHashPrefix, GeoHashUtils.encode(lat,lng),
          Field.Store.YES,
View Full Code Here

Examples of org.apache.lucene.spatial.tier.projections.CartesianTierPlotter

   longX = 0.0
    }
   
    //System.err.println("getBoxShape:"+latY+"," + longY);
    //System.err.println("getBoxShape:"+latX+"," + longX);
    CartesianTierPlotter ctp = new CartesianTierPlotter(2, projector,tierPrefix);
    int bestFit = ctp.bestFit(miles);
   
    ctp = new CartesianTierPlotter(bestFit, projector,tierPrefix);
    Shape shape = new Shape(ctp.getTierFieldName());
   
    // generate shape
    // iterate from startX->endX
    //     iterate from startY -> endY
    //      shape.add(currentLat.currentLong);
View Full Code Here

Examples of org.apache.lucene.spatial.tier.projections.CartesianTierPlotter

 
 
  private void setUpPlotter(int base, int top) {
   
    for (; base <= top; base ++){
      ctps.add(new CartesianTierPlotter(base,project,
          CartesianTierPlotter.DEFALT_FIELD_PREFIX));
    }
  }
View Full Code Here

Examples of org.apache.lucene.spatial.tier.projections.CartesianTierPlotter

    // add a default meta field to make searching all documents easy
    doc.add(newField("metafile", "doc",Field.Store.YES, Field.Index.ANALYZED));
   
    int ctpsize = ctps.size();
    for (int i =0; i < ctpsize; i++){
      CartesianTierPlotter ctp = ctps.get(i);
      doc.add(new Field(ctp.getTierFieldName(),
          NumericUtils.doubleToPrefixCoded(ctp.getTierBoxId(lat,lng)),
          Field.Store.YES,
          Field.Index.NOT_ANALYZED_NO_NORMS));
     
      doc.add(newField(geoHashPrefix, GeoHashUtils.encode(lat,lng),
          Field.Store.YES,
View Full Code Here

Examples of org.apache.lucene.spatial.tier.projections.CartesianTierPlotter

 
 
  private void setUpPlotter(int base, int top) {
   
    for (; base <= top; base ++){
      ctps.add(new CartesianTierPlotter(base,project,
          CartesianTierPlotter.DEFALT_FIELD_PREFIX));
    }
  }
View Full Code Here

Examples of org.apache.lucene.spatial.tier.projections.CartesianTierPlotter

    // add a default meta field to make searching all documents easy
    doc.add(new Field("metafile", "doc",Field.Store.YES, Field.Index.TOKENIZED));
   
    int ctpsize = ctps.size();
    for (int i =0; i < ctpsize; i++){
      CartesianTierPlotter ctp = ctps.get(i);
      doc.add(new Field(ctp.getTierFieldName(),
          NumericUtils.doubleToPrefixCoded(ctp.getTierBoxId(lat,lng)),
          Field.Store.YES,
          Field.Index.NO_NORMS));
     
      doc.add(new Field(geoHashPrefix, GeoHashUtils.encode(lat,lng),
          Field.Store.YES,
View Full Code Here

Examples of org.apache.lucene.spatial.tier.projections.CartesianTierPlotter

 
 
  private void setUpPlotter(int base, int top) {
   
    for (; base <= top; base ++){
      ctps.add(new CartesianTierPlotter(base,project,
          CartesianTierPlotter.DEFALT_FIELD_PREFIX));
    }
  }
View Full Code Here

Examples of org.apache.lucene.spatial.tier.projections.CartesianTierPlotter

    // add a default meta field to make searching all documents easy
    doc.add(new Field("metafile", "doc",Field.Store.YES, Field.Index.TOKENIZED));
   
    int ctpsize = ctps.size();
    for (int i =0; i < ctpsize; i++){
      CartesianTierPlotter ctp = ctps.get(i);
      doc.add(new Field(ctp.getTierFieldName(),
          NumericUtils.doubleToPrefixCoded(ctp.getTierBoxId(lat,lng)),
          Field.Store.YES,
          Field.Index.NO_NORMS));
     
      doc.add(new Field(geoHashPrefix, GeoHashUtils.encode(lat,lng),
          Field.Store.YES,
View Full Code Here

Examples of org.apache.lucene.spatial.tier.projections.CartesianTierPlotter

    double latX = box.getMinPoint().getY() ; //box.getMaxY();
   
    double longY = box.getMaxPoint().getX(); ///box.getX();
    double longX = box.getMinPoint().getX();//box.getMaxX();
   
    CartesianTierPlotter ctp = new CartesianTierPlotter(2, projector,tierPrefix);
    int bestFit = ctp.bestFit(miles);
   
    log.info("Best Fit is : " + bestFit);
    ctp = new CartesianTierPlotter(bestFit, projector,tierPrefix);
    Shape shape = new Shape(ctp.getTierFieldName());
   
    // generate shape
    // iterate from startX->endX
    //     iterate from startY -> endY
    //      shape.add(currentLat.currentLong);
   
  
    double beginAt = ctp.getTierBoxId(latX, longX);
    double endAt = ctp.getTierBoxId(latY, longY);
   
    double tierVert = ctp.getTierVerticalPosDivider();
    log.fine(" | "+ beginAt+" | "+ endAt);
   
    double startX = beginAt - (beginAt %1);
    double startY = beginAt - startX ; //should give a whole number
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.