Package com.vividsolutions.jts.geom

Examples of com.vividsolutions.jts.geom.PrecisionModel


    LinearRing gwtRing2 = gwtFactory.createLinearRing(new Coordinate[] { new Coordinate(10.0, 20.0),
        new Coordinate(30.0, 10.0), new Coordinate(40.0, 10.0), new Coordinate(10.0, 20.0) });
    Polygon gwtPolygon2 = gwtFactory.createPolygon(gwtRing2, null);
    gwt = gwtFactory.createMultiPolygon(new Polygon[] { gwtPolygon1, gwtPolygon2 });

    jtsFactory = new com.vividsolutions.jts.geom.GeometryFactory(new PrecisionModel(), SRID);
    com.vividsolutions.jts.geom.LinearRing jtsRing1 = jtsFactory
        .createLinearRing(new com.vividsolutions.jts.geom.Coordinate[] {
            new com.vividsolutions.jts.geom.Coordinate(10.0, 10.0),
            new com.vividsolutions.jts.geom.Coordinate(20.0, 10.0),
            new com.vividsolutions.jts.geom.Coordinate(20.0, 20.0),
View Full Code Here


        new Coordinate(20.0, 10.0), new Coordinate(20.0, 20.0) });
    LineString gwtLine2 = gwtFactory.createLineString(new Coordinate[] { new Coordinate(10.0, 20.0),
        new Coordinate(30.0, 10.0), new Coordinate(40.0, 10.0) });
    gwt = gwtFactory.createMultiLineString(new LineString[] { gwtLine1, gwtLine2 });

    jtsFactory = new com.vividsolutions.jts.geom.GeometryFactory(new PrecisionModel(), SRID);
    com.vividsolutions.jts.geom.LineString jtsLine1 = jtsFactory
        .createLineString(new com.vividsolutions.jts.geom.Coordinate[] {
            new com.vividsolutions.jts.geom.Coordinate(10.0, 10.0),
            new com.vividsolutions.jts.geom.Coordinate(20.0, 10.0),
            new com.vividsolutions.jts.geom.Coordinate(20.0, 20.0) });
View Full Code Here

    Point point1 = gwtFactory.createPoint(new Coordinate(10.0, 10.0));
    Point point2 = gwtFactory.createPoint(new Coordinate(10.0, 20.0));
    Point point3 = gwtFactory.createPoint(new Coordinate(20.0, 20.0));
    gwt = gwtFactory.createMultiPoint(new Point[] {point1, point2, point3});

    jtsFactory = new com.vividsolutions.jts.geom.GeometryFactory(new PrecisionModel(), SRID);
    jts = jtsFactory.createMultiPoint(new com.vividsolutions.jts.geom.Coordinate[] {
        new com.vividsolutions.jts.geom.Coordinate(10.0, 10.0),
        new com.vividsolutions.jts.geom.Coordinate(10.0, 20.0),
        new com.vividsolutions.jts.geom.Coordinate(20.0, 20.0)});
  }
View Full Code Here

    Injector myInjector = Guice.createInjector(new GeomajasTestModule());
    gwtFactory = myInjector.getInstance(GeometryFactory.class);
    gwt = gwtFactory.createLinearRing(new Coordinate[] { new Coordinate(10.0, 10.0), new Coordinate(20.0, 10.0),
        new Coordinate(20.0, 20.0), new Coordinate(10.0, 10.0) });

    jtsFactory = new com.vividsolutions.jts.geom.GeometryFactory(new PrecisionModel(), SRID);
    jts = jtsFactory.createLinearRing(new com.vividsolutions.jts.geom.Coordinate[] {
        new com.vividsolutions.jts.geom.Coordinate(10.0, 10.0),
        new com.vividsolutions.jts.geom.Coordinate(20.0, 10.0),
        new com.vividsolutions.jts.geom.Coordinate(20.0, 20.0),
        new com.vividsolutions.jts.geom.Coordinate(10.0, 10.0) });
View Full Code Here

    Injector myInjector = Guice.createInjector(new GeomajasTestModule());
    gwtFactory = myInjector.getInstance(GeometryFactory.class);
    gwt = gwtFactory.createPoint(new Coordinate(10.0, 10.0));
    empty = gwtFactory.createPoint(null);

    jtsFactory = new com.vividsolutions.jts.geom.GeometryFactory(new PrecisionModel(), SRID);
    jts = jtsFactory.createPoint(new com.vividsolutions.jts.geom.Coordinate(10.0, 10.0));
  }
View Full Code Here

    gwtFactory = myInjector.getInstance(GeometryFactory.class);
    gwt = gwtFactory.createLineString(new Coordinate[] { new Coordinate(10.0, 10.0), new Coordinate(20.0, 10.0),
        new Coordinate(20.0, 20.0) });
    empty = gwtFactory.createLineString(null);

    jtsFactory = new com.vividsolutions.jts.geom.GeometryFactory(new PrecisionModel(), SRID);
    jts = jtsFactory.createLineString(new com.vividsolutions.jts.geom.Coordinate[] {
        new com.vividsolutions.jts.geom.Coordinate(10.0, 10.0),
        new com.vividsolutions.jts.geom.Coordinate(20.0, 10.0),
        new com.vividsolutions.jts.geom.Coordinate(20.0, 20.0) });
  }
View Full Code Here

            }
           
            if(tripPattern.shape != null) {
             
              MathTransform mt = GeoUtils.getTransform(new Coordinate(tripPattern.shape.shape.getCoordinateN(0).y, tripPattern.shape.shape.getCoordinateN(0).x));
              GeometryFactory geometryFactory = new GeometryFactory(new PrecisionModel(), 4326);
             
              Coordinate[] mCoords =  tripPattern.shape.shape.getCoordinates();
              ArrayList<Coordinate> coords = new ArrayList<Coordinate>();
             
              for(Coordinate mCoord : mCoords) {
View Full Code Here

      mergedStop.delete();
     
    }

    public void setLocation(Hashtable<String, Double> loc) {
        GeometryFactory geometryFactory = new GeometryFactory(new PrecisionModel(), 4326);
        this.location = geometryFactory.createPoint(new Coordinate(loc.get("lng"), loc.get("lat")));;
    }
View Full Code Here

    }
      
    public Point locationPoint() {
  
      Hashtable<String, Double> loc = this.getLocation();
      GeometryFactory geometryFactory = new GeometryFactory(new PrecisionModel(), 4326);
        return geometryFactory.createPoint(new Coordinate(loc.get("lng"), loc.get("lat")));
    }
View Full Code Here

        this.stopName = stopName;
        this.stopDesc = stopDesc;
        this.stopUrl = stopUrl;
        this.locationType = LocationType.STOP;

        GeometryFactory geometryFactory = new GeometryFactory(new PrecisionModel(), 4326);

        this.location = geometryFactory.createPoint(new Coordinate(lon, lat));;
    }
View Full Code Here

TOP

Related Classes of com.vividsolutions.jts.geom.PrecisionModel

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.