Package chunmap.model.geom

Examples of chunmap.model.geom.Geometry


  }

  @Override
  protected void addGeometry(List<Geometry> geoms) {
    WktReader wkt = new WktReader();
    Geometry g = wkt.read("LineString(0 0,-2 2)");
    Geometry g2 = 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))");
    Geometry g3 = wkt.read("LineString(0 100,-1 250)");
    Geometry g4 = wkt.read("LineString(0 100,1 250)");
    Geometry g5 = wkt.read("LineString(0 100,0 250)");
    Geometry g6 = wkt.read("LineString(0 100,100 101)");
    Geometry g7 = wkt.read("LineString(0 100,100 100)");
    Geometry g8 = wkt.read("LineString(0 100,100 99)");

    Geometry g9 = wkt.read("LineString(0 100,1 101)");
    Geometry g10 = wkt.read("LineString(0 100,-1 101)");
    Geometry g11 = wkt.read("LineString(0 100,-1 99)");

    geoms.add(g);
    geoms.add(g2);
    geoms.add(g3);
    geoms.add(g4);
View Full Code Here


public class LineString_LineStringTest {

  @Test
  public void testGetIM() {
    WktReader wkt = new WktReader();
    Geometry g = wkt.read("LINESTRING(1 1,1 2,2 2,3 2)");
    LineString ls = (LineString) g;
    Geometry g2 = wkt.read("LINESTRING(1 2,2 2,3 2,4 2)");
    LineString ls2 = (LineString) g2;
    Geometry g3 = wkt.read("LINESTRING(1 2,2 2,3 2)");
    LineString ls3 = (LineString) g3;
    Geometry g4 = wkt.read("LINESTRING(2 0,2 2,3 3)");
    LineString ls4 = (LineString) g4;

    IntersectionMatrix rt = ComputeImFactory.getInstance().getImComputer(
        ls, ls2).getIM();
    // LineString_LineString l2l = new LineString_LineString(ls, ls2);
View Full Code Here

  }

  @Test
  public void testGetIM2() {
    WktReader wkt = new WktReader();
    Geometry g = wkt.read("LINESTRING(1.0 1.0,1.0 2.0,2.0 2.0,3.0 2.0)");
    LineString ls = (LineString) g;
    Geometry g2 = wkt
        .read("LINESTRING(1.0 2.0,3.0 1.0,4.0 0.0,3.0 -2.0,0.0 0.0,1.0 2.0)");
    LineString ls2 = (LineString) g2;

    IntersectionMatrix rt = ComputeImFactory.getInstance().getImComputer(
        ls2, ls).getIM();
View Full Code Here

  }

  @Test
  public void testGetIM3() {
    WktReader wkt = new WktReader();
    Geometry g = wkt.read("LINESTRING(2.0 2.0,0.0 0.0)");
    LineString ls = (LineString) g;
    Geometry g2 = wkt
        .read("LINESTRING(0.98 0.94,1.0466666666666666 0.94,1.0466666666666666 1.0066666666666666,0.98 1.0066666666666666,0.98 0.94)");
    LineString ls2 = (LineString) g2;

    // IntersectionMatrix rt = ComputeImFactory.getInstance().getImComputer(
    // ls2, ls).getIM();
View Full Code Here

  }

  @Test
  public void testGetIM4() {
    WktReader wkt = new WktReader();
    Geometry g = wkt.read("LINESTRING(-2.0 2.0,0.0 0.0)");
    LineString ls = (LineString) g;
    Geometry g2 = wkt
        .read("LINESTRING(-1.2533333333333332 1.14,-1.1866666666666665 1.14,-1.1866666666666665 1.2066666666666666,-1.2533333333333332 1.2066666666666666,-1.2533333333333332 1.14)");
    LineString ls2 = (LineString) g2;

    // IntersectionMatrix rt = ComputeImFactory.getInstance().getImComputer(
    // ls2, ls).getIM();
View Full Code Here

  }

  @Test
  public void testGetIM5() {
    WktReader wkt = new WktReader();
    Geometry g = wkt
        .read("LINESTRING(1.0 6.0,5.999998414659173 1.0039816335536662,1.0079632645824341 -3.999993658637697,-3.9999857319385903 0.9880551094385923,1.0 6.0)");
    LineString ls = (LineString) g;
    Geometry g2 = wkt
        .read("LINESTRING(-2.639991350383829 -1.7999950537374092,-1.8399918576928131 -1.7999950537374092,-1.8399918576928131 -0.9999955610463935,-2.639991350383829 -0.9999955610463935,-2.639991350383829 -1.7999950537374092)");
    LineString ls2 = (LineString) g2;

    // IntersectionMatrix rt = ComputeImFactory.getInstance().getImComputer(
    // ls2, ls).getIM();
View Full Code Here

  @Override
  public void execute(Feature obj) {
    if (obj instanceof Shape) {
      Shape feature = (Shape) obj;
      Geometry g = feature.getGeometry();
//      if(Log.isDubug()){
//        Log.log(Logger.Debug, "geometry =" +g.getEnvelop()+"envelope="+env.toString());
//      }
      if (g == null)
        return;
View Full Code Here

public class Point_LineStringTest {

  @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)");
    LineString ls = (LineString) g;
    GeoPoint p1 = new GeoPoint(1, 0);

    IntersectionMatrix rt = ComputeImFactory.getInstance().getImComputer(p1, ls).getIM();
View Full Code Here

  }

  @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)");
    LineString ls = (LineString) g;
    GeoPoint p1 = new GeoPoint(0, 0);

    IntersectionMatrix rt = ComputeImFactory.getInstance().getImComputer(p1, ls).getIM();
View Full Code Here

  }

  @Test
  public void testMultiPoint2LineString() {
    WktReader wkt = new WktReader();
    Geometry g = wkt.read("LINESTRING(1.0 2.0,2.0 2.0,3.0 2.0,4.0 2.0)");
    LineString ls = (LineString) g;
    GeoPoint p1 = new GeoPoint(1.0, 1.0);

    IntersectionMatrix rt = ComputeImFactory.getInstance().getImComputer(p1, ls).getIM();
View Full Code Here

TOP

Related Classes of chunmap.model.geom.Geometry

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.