Package chunmap.model.geom

Examples of chunmap.model.geom.LineString


  public ComputeIm getImComputer(Geometry g1, Geometry g2) {
    if (g1 instanceof GeoPoint) {
      GeoPoint p1 = (GeoPoint) g1;
      return pointTo(p1, g2);
    } else if (g1 instanceof LineString) {
      LineString l1 = (LineString) g1;
      return lineTo(l1, g2);

    } else if (g1 instanceof Polygon) {
      Polygon a1 = (Polygon) g1;
      return polygonTo(a1, g2);
View Full Code Here


  public ComputeIm pointTo(GeoPoint p1, Geometry g2) {
    if (g2 instanceof GeoPoint) {
      GeoPoint p2 = (GeoPoint) g2;
      return new Point_Point(p1, p2);
    } else if (g2 instanceof LineString) {
      LineString l2 = (LineString) g2;
      return new Point_LineString(p1, l2);

    } else if (g2 instanceof Polygon) {
      Polygon a2 = (Polygon) g2;
      return new Point_Polygon(p1, a2);
View Full Code Here

  public ComputeIm lineTo(LineString l1, Geometry g2) {
    if (g2 instanceof GeoPoint) {
      GeoPoint p2 = (GeoPoint) g2;
      return new Point_LineString(p2, l1).setReverse(true);
    } else if (g2 instanceof LineString) {
      LineString l2 = (LineString) g2;
      return new LineString_LineString(l1, l2);

    } else if (g2 instanceof Polygon) {
      Polygon a2 = (Polygon) g2;
      return new LineString_Polygon(l1, a2);
View Full Code Here

  public ComputeIm polygonTo(Polygon a1, Geometry g2) {
    if (g2 instanceof GeoPoint) {
      GeoPoint p2 = (GeoPoint) g2;
      return new Point_Polygon(p2, a1).setReverse(true);
    } else if (g2 instanceof LineString) {
      LineString l2 = (LineString) g2;
      return new LineString_Polygon(l2, a1).setReverse(true);

    } else if (g2 instanceof Polygon) {
      Polygon a2 = (Polygon) g2;
      return new Polygon_Polygon(a1, a2);
View Full Code Here

    }
    return false;
  }

  public LineString toLineString() {
    return new LineString(points);
  }
View Full Code Here

            {
                return new GeoPoint((CPoint)r);
            }
            else if (r instanceof CPoint[])
            {
                return new LineString((CPoint[])r);
            }
            else
            {
                throw new CMAssert.AssertionEexception("unreachable code");
            }
View Full Code Here

    g2 = l2;
  }

  @Override
  protected int inner2innerDim(Geometry g1, Geometry g2) {
    LineString l1 = (LineString) g1;
    LineString l2 = (LineString) g2;

    PointLineBag bag = l1.intersection(l2);

    if (bag.getLineStringSize() > 0)
      return LineDim;
View Full Code Here

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

    LineString l1 = (LineString) g1;
    LineString l2 = (LineString) g2;

    if (l2.containLineString(l1)) {
      return true;
    }

    return false;
  }
View Full Code Here

  public void drawLineString(Graphics2D g, Geometry geo,View view) {
    g.setPaint(style.getLineColor());
    g.setStroke(style.getStroke());

    LineString ls = (LineString) geo;

    int[] xa=getXa(ls,view);
    int[] ya=getYa(ls,view);
   
    g.drawPolyline(xa, ya, ls.size());

    if (style.isNeedPoint()) {
      drawPoints4Line(g, ls, style,view);
    }
  }
View Full Code Here

    g2 = a2;
  }

  @Override
  protected int inner2innerDim(Geometry g1, Geometry g2) {
    LineString l1 = (LineString) g1;
    Polygon a2 = (Polygon) g2;

    ComputeIm l2r = new LineString_LinearRing(l1, a2.getShell());
    IntersectionMatrix tim = l2r.getIM();
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.