Package chunmap.model.geom

Examples of chunmap.model.geom.Ring


    return ya;
  }

  public void drawPolygon(Graphics2D g, Geometry geo,View view) {
    Polygon pg = (Polygon) geo;
    Ring shell = pg.getShell();
    java.awt.Polygon shellPaht = createPolygon(shell,view);
    //shellPaht.closePath();
    Area area = new Area(shellPaht);
    for (Ring r : pg.getHoles()) {
      java.awt.Polygon holePath = createPolygon(r,view);
View Full Code Here


    points.add(p2);
    points.add(p3);
    points.add(p4);
    points.add(p1);

    return new Ring(points);
  }
View Full Code Here

            return env.toRing().hasIntersection(ls);
        }
        else if (geom instanceof Polygon)
        {
            Polygon pg = (Polygon)geom;
            Ring r = env.toRing();
            if (pg.getShell().containIn(env.getCenter()))
            {
                if (inHoles(r, pg))
                {
                    return false;
                }
                return true;
            }
            else
            {
                if (r.hasIntersection(pg.getShell())) return true;

                return false;
            }
        }
        else if (geom instanceof GeometryCollection)
View Full Code Here

  }

  @Override
  protected int inner2innerDim(Geometry g1, Geometry g2) {
    GeoPoint p1 = (GeoPoint) g1;
    Ring r2 = ((Polygon) g2).getShell();

    // 在边界
    if (im.get(Inner, Border) != EmptyDim)
      return EmptyDim;

    // 内部
    if (r2.containIn(p1.getCoordinate()))
      return PointDim;

    return EmptyDim;
  }
View Full Code Here

TOP

Related Classes of chunmap.model.geom.Ring

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.