Examples of createPoint()


Examples of com.vividsolutions.jts.geom.GeometryFactory.createPoint()

    GeometryFactory geometryFactory = new GeometryFactory(precisionModel, LAYER_SRID);
    Coordinate coordinate = new Coordinate();
    coordinate.x = coordinate.y = 0.5;
    Assert.assertFalse(geometry.contains(geometryFactory.createPoint(coordinate)));
    coordinate.x = coordinate.y = 1.5;
    Assert.assertFalse(geometry.contains(geometryFactory.createPoint(coordinate)));
    coordinate.x = coordinate.y = 2.5;
    Assert.assertTrue(geometry.contains(geometryFactory.createPoint(coordinate)));
    coordinate.x = coordinate.y = 3.5;
    Assert.assertFalse(geometry.contains(geometryFactory.createPoint(coordinate)));
    coordinate.x = coordinate.y = 4.5;
View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryFactory.createPoint()

    coordinate.x = coordinate.y = 0.5;
    Assert.assertFalse(geometry.contains(geometryFactory.createPoint(coordinate)));
    coordinate.x = coordinate.y = 1.5;
    Assert.assertFalse(geometry.contains(geometryFactory.createPoint(coordinate)));
    coordinate.x = coordinate.y = 2.5;
    Assert.assertTrue(geometry.contains(geometryFactory.createPoint(coordinate)));
    coordinate.x = coordinate.y = 3.5;
    Assert.assertFalse(geometry.contains(geometryFactory.createPoint(coordinate)));
    coordinate.x = coordinate.y = 4.5;
    Assert.assertFalse(geometry.contains(geometryFactory.createPoint(coordinate)));
View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryFactory.createPoint()

     
    }

    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")));;
    }
      
    public Point locationPoint() {
  
      Hashtable<String, Double> loc = this.getLocation();
View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryFactory.createPoint()

      
    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")));
    }

    public Stop(org.onebusaway.gtfs.model.Stop stop, GeometryFactory geometryFactory) {

        this.gtfsStopId = stop.getId().toString();
View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryFactory.createPoint()

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

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

        this.location = geometryFactory.createPoint(new Coordinate(lon, lat));;
    }


    public static BigInteger nativeInsert(EntityManager em, org.onebusaway.gtfs.model.Stop gtfsStop, BigInteger agencyId)
    {
View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryFactory.createPoint()

          .getResultList();

      Object[] cols = result.get(0);
        GeometryFactory geometryFactory = new GeometryFactory(new PrecisionModel(), 4326);
       
        return geometryFactory.createPoint(new Coordinate((Double)cols[0], (Double)cols[1]));
    }
   
    public static List<List<Stop>> findDuplicateStops(BigInteger agencyId) {
     
      // !!! need to autodetect proper SRID for UTM Zone
View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryFactory.createPoint()

     
      while(i < geomCount)
      {
        LineString lineSegment = (LineString)this.originalShape.getGeometryN(i);
       
        GisRouteControlPoint fromPoint = findControlPoint(geometryFactory.createPoint(lineSegment.getCoordinateN(0)), sequenceId);
       
        sequenceId = fromPoint.originalSequence + 1;
       
         GisRouteControlPoint toPoint = findControlPoint(geometryFactory.createPoint((lineSegment.getCoordinateN(lineSegment.getNumPoints() - 1))), sequenceId);
        
View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryFactory.createPoint()

       
        GisRouteControlPoint fromPoint = findControlPoint(geometryFactory.createPoint(lineSegment.getCoordinateN(0)), sequenceId);
       
        sequenceId = fromPoint.originalSequence + 1;
       
         GisRouteControlPoint toPoint = findControlPoint(geometryFactory.createPoint((lineSegment.getCoordinateN(lineSegment.getNumPoints() - 1))), sequenceId);
        
         sequenceId = toPoint.originalSequence + 1;
        
         if(GisRouteSegment.count("fromPoint = ? AND toPoint = ?", fromPoint, toPoint) == 0)
         {
View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryFactory.createPoint()

  public void setUp() throws Exception {
    type1=DataUtilities.createType("type1", "geom1:LineString,name:String,id:int,geom2:Point")//$NON-NLS-1$//$NON-NLS-2$
    type2=DataUtilities.createType("type2", "geom2:Point,name:String"); //$NON-NLS-1$ //$NON-NLS-2$
   
    GeometryFactory fac=new GeometryFactory();
    point=fac.createPoint(new Coordinate(10,10));
   
    line=fac.createLineString(new Coordinate[]{
      new Coordinate(20,20), new Coordinate(30,30
    });
   
View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryFactory.createPoint()

    id=1;
     
    original=SimpleFeatureBuilder.build( type1, new Object[]{
        line,name,id,point
    }, null);
    newPoint=fac.createPoint(new Coordinate(0,0));
    wrapped=new FeatureWrapper(original,type2, new Geometry[]{newPoint}, new String[]{"geom2"}); //$NON-NLS-1$
  }
 
  @Ignore
  public void testGetAttributeInt() {
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.