Examples of GeoPoint


Examples of chunmap.model.geom.GeoPoint

  @Test
  public void testGetIM() {
    WktReader wkt = new WktReader();
    Geometry g = wkt.read("LINESTRING(1 2,3 1,4 0,3 -2,0 0,1 2)");
    Ring lr = ((LineString) g).toLinearRing();
    GeoPoint p1 = new GeoPoint(1, 0);

    ComputeIm p2r = new Point_LinearRing(p1, lr);
    IntersectionMatrix rt = p2r.getIM();

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

Examples of chunmap.model.geom.GeoPoint

  @Test
  public void testGetIM2() {
    WktReader wkt = new WktReader();
    Geometry g = wkt.read("LINESTRING(1 2,3 1,4 0,3 -2,0 0,1 2)");
    Ring lr = ((LineString) g).toLinearRing();
    GeoPoint p1 = new GeoPoint(2, 2);

    ComputeIm p2r = new Point_LinearRing(p1, lr);
    IntersectionMatrix rt = p2r.getIM();

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

Examples of chunmap.model.geom.GeoPoint

    g2 = p2;
  }

  @Override
  protected void computeIM() {
    GeoPoint p1 = (GeoPoint) g1;
    GeoPoint p2 = (GeoPoint) g2;
    if (p1.equals(p2)) {
      im.set(Inner, Inner, PointDim);
    } else {
      im.set(Inner, Inner, EmptyDim);
      im.set(Inner, Outer, PointDim);
View Full Code Here

Examples of chunmap.model.geom.GeoPoint

  @Test
  public void testGetIM() {
    WktReader wkt = new WktReader();
    Geometry g = wkt.read("POLYGON((1 2,3 1,4 0,3 -2,0 0,1 2))");
    Polygon pg = (Polygon) g;
    GeoPoint p1 = new GeoPoint(1, 0);
    GeoPoint p2 = new GeoPoint(2, 2);

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

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

Examples of chunmap.model.geom.GeoPoint

  public void testGetIM2() {
    WktReader wkt = new WktReader();
    Geometry g = wkt
        .read("POLYGON((-5 -8,10 -20,20 15,-10 10,-5 -8),(1 2,3 1,4 0,3 -2,0 0,1 2))");
    Polygon pg = (Polygon) g;
    GeoPoint p1 = new GeoPoint(1, 0);
    GeoPoint p2 = new GeoPoint(2, 2);
    GeoPoint p3 = new GeoPoint(100, 2);

    IntersectionMatrix rt = ComputeImFactory.getInstance().getImComputer(p1, pg).getIM();
    IntersectionMatrix rt2 = ComputeImFactory.getInstance().getImComputer(p2, pg).getIM();
    IntersectionMatrix rt3 = ComputeImFactory.getInstance().getImComputer(p3, pg).getIM();
View Full Code Here

Examples of chunmap.model.geom.GeoPoint

    me.init();
  }

  @Override
  protected void addGeometry(List<Geometry> geoms) {
    GeoPoint p = new GeoPoint(1, 1);
    PointBuffer pb = new PointBuffer();
    geoms.add(pb.createBuffer(p.getCoordinate(), 5));
    geoms.add(p);

    CPoint p1 = new Coordinate2D(-5, -5);
    CPoint p2 = new Coordinate2D(-10, -10);
    LineSegment lseg = new LineSegment(p1, p2);
View Full Code Here

Examples of chunmap.model.geom.GeoPoint

    return instance;
  }

  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);
View Full Code Here

Examples of chunmap.model.geom.GeoPoint

    }
  }

  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);
View Full Code Here

Examples of chunmap.model.geom.GeoPoint

  }

  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);
View Full Code Here

Examples of chunmap.model.geom.GeoPoint

    }
  }

  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);
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.