Package com.vividsolutions.jts.geom

Examples of com.vividsolutions.jts.geom.PrecisionModel


      List<Object[]> result = Stop.em().createNativeQuery("SELECT st_x(calc.center), st_y(calc.center) from (SELECT ST_Centroid(ST_Extent(location)) as center FROM stop WHERE agency_id = ?) calc ;")
          .setParameter(1,  agencyId)
          .getResultList();

      Object[] cols = result.get(0);
        GeometryFactory geometryFactory = new GeometryFactory(new PrecisionModel(), 4326);
       
        return geometryFactory.createPoint(new Coordinate((Double)cols[0], (Double)cols[1]));
    }
View Full Code Here


 
  public void setUp() throws Exception
  {
    super.setUp();
   
    this.geometryFactory = new GeometryFactory( new PrecisionModel( PrecisionModel.FLOATING ), 27700 );
    this.standardView = this.geometryFactory.createLineString( LimbGeneratorTest.Utils.createBoxCoords( 0, 1000, 0, 1000 ) );
  }
View Full Code Here

 
  public void setUp() throws Exception
  {
    super.setUp();
   
    this.geometryFactory = new GeometryFactory( new PrecisionModel( PrecisionModel.FLOATING ), 27700 );
    this.processor = new DiscardNegligibleIntersectionProcessor();
  }
View Full Code Here

 
  public void setUp() throws Exception
  {
    super.setUp();
   
    this.geometryFactory = new GeometryFactory( new PrecisionModel( PrecisionModel.FLOATING ), 27700 );
   
    this.defaultView = this.geometryFactory.createLinearRing( LimbGeneratorTest.Utils.createBoxCoords( 1000, 2000, 333, 933 ) );
    this.defaultViewEnvelope = this.defaultView.getEnvelopeInternal();
    this.fullScreenSize = new Dimension( 1000, 600 );
    this.halfScreenSize = new Dimension( 500, 300 );
View Full Code Here

 
  public void setUp() throws Exception
  {
    super.setUp();
   
    this.geometryFactory = new GeometryFactory( new PrecisionModel( PrecisionModel.FLOATING ), 27700 );
   
    // TODO Try using the SimpleFeatureBuilder class.
    GeometryType geometryType = LimbGeneratorTest.Utils.createGeometryType( LineString.class );
    GeometryDescriptor geometryDescriptor = LimbGeneratorTest.Utils.createGeometryDescriptor( geometryType );
    List<AttributeDescriptor> attributeDescriptors = new ArrayList<AttributeDescriptor>();
View Full Code Here

  protected Limb limb;
 
 
  public void setUp() throws Exception
  {
    this.geometryFactory = new GeometryFactory( new PrecisionModel( PrecisionModel.FLOATING ), 27700 );
   
    SimpleFeatureType featureType = new SimpleFeatureTypeImpl( new NameImpl( "test" ), null, null, false, null, null, null );
    Feature feature = new SimpleFeatureImpl( new ArrayList<Object>(), featureType, new FeatureIdImpl( "test" ) );
   
    this.limb = new Limb();
View Full Code Here

  {
    super.setUp();
   
    this.geoJsonBuffer = new StringWriter();
    this.geoJsonWriter = new GeoJsonWriter( this.geoJsonBuffer );
    this.geometryFactory = new GeometryFactory( new PrecisionModel( PrecisionModel.FLOATING ), 27700 );
  }
View Full Code Here

   */
  public void setUp() throws Exception
  {
    super.setUp();
   
    this.geometryFactory = new GeometryFactory( new PrecisionModel( PrecisionModel.FLOATING ), 27700 );
   
   
    this.heavilyPopulatedArea  = setUpBounds1000500010005000 );
    this.sparselyPopulatedArea = setUpBounds( 11000, 15000, 11000, 15000 );
   
View Full Code Here

 
  public void setUp() throws Exception
  {
    super.setUp();
   
    this.geometryFactory = new GeometryFactory( new PrecisionModel( PrecisionModel.FLOATING ), 27700 );
   
    LinearRing exampleLinearRing = this.geometryFactory.createLinearRing( Utils.createBoxCoords( 0, 1, 0, 1 ) );
    Polygon examplePolygon = this.geometryFactory.createPolygon( exampleLinearRing, null );
    this.linearRingGeomDescriptor = Utils.createGeometryDescriptor( Utils.createGeometryType( exampleLinearRing ) );
    this.polygonGeomDescriptor = Utils.createGeometryDescriptor( Utils.createGeometryType( examplePolygon ) );
View Full Code Here

    coords[4] = new Coordinate( view.getMinX(), view.getMinY() );
   
    GeometryFactory geometryFactory;
    if (request.getSrid() == null)
    {
      geometryFactory = new GeometryFactory( new PrecisionModel( PrecisionModel.FLOATING ) );
    }
    else
    {
      geometryFactory = new GeometryFactory( new PrecisionModel( PrecisionModel.FLOATING ), request.getSrid() );
    }
   
    return geometryFactory.createLinearRing( coords );
  }
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.