Package chunmap.model.elem

Examples of chunmap.model.elem.Envelope


      double d = 5d;
      double minx = x - d;
      double miny = y - d;
      double maxx = x + d;
      double maxy = y + d;
      Envelope env = new Envelope(minx, miny, maxx, maxy);
      Transform trans = map.getView().screen2World();
      Envelope env2 = env.transform(trans);
     
      String sizes= request.getParameter("FEATURE_COUNT");
      int size=100;
      if(sizes!=null){
        size=Integer.valueOf(sizes);
View Full Code Here


  /**
   * 计算IM的模板,主要方法。次方法也可能被子类覆盖以提高效率
   */
  protected void computeIM() {
    Envelope en1 = g1.getEnvelop();
    boolean hasInte = en1.hasIntersect(g2.getEnvelop());
    if (!hasInte) {
      // 相离时
      disjoin();
    } else {
      // 设置边界
View Full Code Here

    //------------------------------------------------------------------------
    private void initFeatureCollection(FeatureCollection featureClass)
    {
        for (long i = 0, n = dataResources.size(); i < n; i++)
        {
            Envelope envelop = dataResources.getShapeEnvelop(i);

            if (geometryFilter == null || geometryFilter.apply(envelop))
            {
                Geometry geo=dataResources.getGeometry(i);
                if (geo == null)
View Full Code Here

        initFeatureCollection(featureClass);
        return featureClass;
    }
    public FeatureCollection createQuartTree()
    {
        Envelope allEnvelope = dataResources.getEnvelop();
        FeatureCollection featureClass = new QuartTree(allEnvelope);
        initFeatureCollection(featureClass);
        return featureClass;
    }
View Full Code Here

        minY = y;
      } else if (y > maxY) {
        maxY = y;
      }
    }
    return new Envelope(getFirst().getX(), minY, getLast().getX(), maxY);
  }
View Full Code Here

  private Envelope mEnv() {
    if (isVertical) {
      double oneFour = (window.getMaxX() - window.getMinX()) / 4d;
      double maxX = window.getMaxX() - oneFour;
      double minX = window.getMinX() + oneFour;
      return new Envelope(minX, window.getMinY(), maxX, window.getMaxY());
    } else {
      double oneFour = (window.getMaxY() - window.getMinY()) / 4d;
      double maxY = window.getMaxY() - oneFour;
      double minY = window.getMinY() + oneFour;
      return new Envelope(window.getMinX(), window.getMaxX(), minY, maxY);
    }
  }
View Full Code Here

  private Envelope rEnv() {
    if (isVertical) {
      double oneTwo = (window.getMaxX() - window.getMinX()) / 2d;
      double maxX = window.getMaxX() - oneTwo;
      double minX = window.getMinX();
      return new Envelope(minX, window.getMinY(), maxX, window.getMaxY());
    } else {
      double oneTwo = (window.getMaxX() - window.getMinX()) / 2d;
      double maxY = window.getMaxY() - oneTwo;
      double minY = window.getMinY();
      return new Envelope(window.getMinX(), window.getMaxX(), minY, maxY);
    }
  }
View Full Code Here

  private Envelope lEnv() {
    if (isVertical) {
      double oneTwo = (window.getMaxX() - window.getMinX()) / 2d;
      double maxX = window.getMaxX();
      double minX = window.getMinX() + oneTwo;
      return new Envelope(minX, window.getMinY(), maxX, window.getMaxY());
    } else {
      double oneTwo = (window.getMaxX() - window.getMinX()) / 2d;
      double maxY = window.getMaxY();
      double minY = window.getMinY() + oneTwo;
      return new Envelope(window.getMinX(), window.getMaxX(), minY, maxY);
    }
  }
View Full Code Here

    private void createLeaf()
    {
        subNode = new QuartNode[4];
        CPoint p=envelope.getCenter();

        Envelope env;
        env=new Envelope(envelope.getMinPoint(),p);
        subNode[0] = new QuartNode(env, deep + 1, maxDeep);

        env = new Envelope(envelope.rightDown(), p);
        subNode[1] = new QuartNode(env, deep + 1, maxDeep);

        env = new Envelope(envelope.leftUp(), p);
        subNode[2] = new QuartNode(env, deep + 1, maxDeep);

        env = new Envelope(envelope.getMaxPoint(), p);
        subNode[3] = new QuartNode(env, deep + 1, maxDeep);
    }
View Full Code Here

  }

  private void drawRaster(Raster tile) {
    // draw raster
    Image image=tile.getImage();
    Envelope env = tile.getEnvelop().transform(view.world2Screen());
    if ( image!= null) {
      double x=(int)(env.getMinX()-0.5);
      double y=(int)(env.getMinY()-0.5);
      double w=env.getWidth()+0.5;
      double h=env.getHeight()+0.5;
     
      drawHelper.drawImage(g, image, (int)x , (int) y, (int)w ,(int)h);
      // drawHelper.drawLineString(g, env.toPolygon().getShell(),
      // (Style2D) defaultStyle);
    }else{
      g.setColor(Color.black);
      g.drawString("no data. engine by Chun-Map"
          , (int)env.getCenter().getX(), (int)env.getCenter().getY());
    }
  }
View Full Code Here

TOP

Related Classes of chunmap.model.elem.Envelope

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.