Package chunmap.model.geom

Examples of chunmap.model.geom.LineString


  @Override
  protected boolean within(Geometry g1, Geometry g2) {
    if (im.get(Inner, Inner) == EmptyDim)
      return false;

    LineString l1 = (LineString) g1;
    Polygon a2 = (Polygon) g2;

    if (!a2.getShell().containLineStringIn(l1)) {
      return false;
    }
View Full Code Here


          CPoint p = ((GeoPoint)geom).getCoordinate();
            return env.contain(p);
        }
        else if (geom instanceof LineString)
        {
            LineString ls = (LineString)geom ;
            return env.toRing().hasIntersection(ls);
        }
        else if (geom instanceof Polygon)
        {
            Polygon pg = (Polygon)geom;
View Full Code Here

    CPoint p3 = new Coordinate2D(-w, -h);
    points.add(p1);
    points.add(p2);
    points.add(p3);

    LineString ls = new LineString(points);
    geometry = ls;
  }
View Full Code Here

    drawGeo(g,geo,renderer);
  }
 
  public void drawGeo(Graphics g, Geometry geo, View renderer) {
    if (geo instanceof LineString) {
      LineString ls = (LineString) geo;
      drawLineSymbol((Graphics2D) g, ls);
    } else if (geo instanceof Polygon) {
      Polygon pg = (Polygon) geo;
      drawLineSymbol((Graphics2D) g, pg.getShell());
      for (Ring r : pg.getHoles()) {
View Full Code Here

      // 距离过小时不画
      LineSegment lseg = new LineSegment(p1, p2);
      if (lseg.taxiDistance() < dis)
        continue;

      LineString lsa = (LineString) getGeometry(p1, p2);
      GeneralPath path = toGeneralPath(lsa);
      g.fill(path);
    }

  }
View Full Code Here

TOP

Related Classes of chunmap.model.geom.LineString

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.