Examples of GeoPoint


Examples of chunmap.model.geom.GeoPoint

      Object r = getPreLineSegment().intersection(ls);
            if (r == null) return null;

            if (r instanceof CPoint)
            {
                return new GeoPoint((CPoint)r);
            }
            else if (r instanceof CPoint[])
            {
                return new LineString((CPoint[])r);
            }
View Full Code Here

Examples of chunmap.model.geom.GeoPoint

  private Geometry getIntersection(CPoint p) {
    if (hasPre()) {
      return getIntersection(getPreLineSegment(), p);
    } else {
      if (p.equals(this.getCursorPoint()))
        return new GeoPoint(p);
      else
        return null;
    }
  }
View Full Code Here

Examples of chunmap.model.geom.GeoPoint

    }
  }

  private Geometry getIntersection(LineSegment ls, CPoint p) {
    if (ls.onLineSegment(p))
      return new GeoPoint(p);
    else
      return null;
  }
View Full Code Here

Examples of chunmap.model.geom.GeoPoint

  public void drawPoint(Graphics2D g, Geometry geo,View view) {

    int pointSize = style.getPointSize();
    double half = pointSize / 2d;

    GeoPoint p = (GeoPoint) geo;
    double x = view.x2Screen(p.getX()) - half;
    double y = view.y2Screen(p.getY()) - half;

    g.setPaint(style.getPointColor());
    g.setStroke(style.getStroke());

    g.fillOval((int) x, (int) y, pointSize, pointSize);
View Full Code Here

Examples of chunmap.model.geom.GeoPoint

  /**
   * {@link chunmap.model.relate.relateop.Point_Point#computeIM()} 的测试方法。
   */
  @Test
  public void testComputeIM() {
    GeoPoint p1 = new GeoPoint(1, 2);
    GeoPoint p2 = new GeoPoint(1, 0);

    ComputeIm r = new Point_Point(p1, p2);
    IntersectionMatrix rt = r.getIM();

    assertTrue(rt.match(IntersectionMatrix.DisjointPattern));
View Full Code Here

Examples of chunmap.model.geom.GeoPoint

    assertTrue(rt.match(IntersectionMatrix.DisjointPattern));
  }

  @Test
  public void testComputeIM2() {
    GeoPoint p1 = new GeoPoint(1, 2);
    GeoPoint p2 = new GeoPoint(1, 2);

    ComputeIm r = new Point_Point(p1, p2);
    IntersectionMatrix rt = r.getIM();

    assertFalse(rt.match(IntersectionMatrix.DisjointPattern));
View Full Code Here

Examples of chunmap.model.geom.GeoPoint

    assertFalse(rt.match(IntersectionMatrix.DisjointPattern));
  }

  @Test
  public void testComputeIM3() {
    GeoPoint p1 = new GeoPoint(1, 2);
    GeoPoint p2 = new GeoPoint(1, 0);

    IntersectionMatrix rt = ComputeImFactory.getInstance().getImComputer(p1, p2).getIM();

    assertTrue(rt.match(IntersectionMatrix.DisjointPattern));
  }
View Full Code Here

Examples of chunmap.model.geom.GeoPoint

  protected int inner2innerDim(Geometry g1, Geometry g2) {
    if (im.get(Inner, Border) != EmptyDim) {
      return EmptyDim;
    }

    GeoPoint p1 = (GeoPoint) g1;
    Polygon a2 = (Polygon) g2;
    if (a2.getShell().containIn(p1.getCoordinate())) {
      for (Ring r : a2.getHoles()) {
        if (r.containIn(p1.getCoordinate())) {
          return EmptyDim;
        }
      }
      return PointDim;
    }
View Full Code Here

Examples of chunmap.model.geom.GeoPoint

    g2 = r2.toPolygon();
  }

  @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

Examples of com.amazonaws.geo.model.GeoPoint

          String schoolId = columns[0];
          String schoolName = columns[1];
          double latitude = Double.parseDouble(columns[2]);
          double longitude = Double.parseDouble(columns[3]);

          GeoPoint geoPoint = new GeoPoint(latitude, longitude);
          AttributeValue rangeKeyValue = new AttributeValue().withS(schoolId);
          AttributeValue schoolNameValue = new AttributeValue().withS(schoolName);

          PutPointRequest putPointRequest = new PutPointRequest(geoPoint, rangeKeyValue);
          putPointRequest.getPutItemRequest().getItem().put("schoolName", schoolNameValue);
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.