Examples of EnvelopeImpl


Examples of org.geotools.geometry.iso.coordinate.EnvelopeImpl

    PrimitiveFactoryImpl factory = (PrimitiveFactoryImpl) container.getComponentInstanceOfType( PrimitiveFactoryImpl.class );
    PositionFactory positionFactory = (PositionFactory ) container.getComponentInstanceOfType( PositionFactory.class );
   
    DirectPosition positionA = positionFactory.createDirectPosition(new double[]{10, 10});
    DirectPosition positionB = positionFactory.createDirectPosition(new double[]{70, 30});
    Envelope bounds = new EnvelopeImpl( positionA, positionB );
   
    LineSegmentImpl segment = new LineSegmentImpl( crs, new double[]{10,Double.NaN}, new double[]{70,Double.NaN}, 0.0 );
   
    // create expected ring
    DirectPosition one = new DirectPositionImpl( segment.getStartPoint() );
    one.setOrdinate( 1, bounds.getMinimum(1) );
   
    DirectPosition two = new DirectPositionImpl( segment.getEndPoint() );
    two.setOrdinate( 1, bounds.getMinimum(1) );
   
    DirectPosition three = new DirectPositionImpl( two );
    three.setOrdinate( 1, bounds.getMaximum(1) );
   
    DirectPosition four = new DirectPositionImpl( one );
    four.setOrdinate( 1, bounds.getMaximum(1) );
   
    LineSegment edge1 = new LineSegmentImpl( one, two, 0.0 );
    LineSegment edge2 = new LineSegmentImpl( two, three, 0.0 );
    LineSegment edge3 = new LineSegmentImpl( three, four, 0.0 );
    LineSegment edge4 = new LineSegmentImpl( four, one, 0.0 );
View Full Code Here

Examples of org.geotools.geometry.iso.coordinate.EnvelopeImpl

    PrimitiveFactoryImpl factory = (PrimitiveFactoryImpl) container.getComponentInstanceOfType( PrimitiveFactoryImpl.class );
    PositionFactory positionFactory = (PositionFactory ) container.getComponentInstanceOfType( PositionFactory.class );
   
    DirectPosition positionA = positionFactory.createDirectPosition(new double[]{10, 10});
    DirectPosition positionB = positionFactory.createDirectPosition(new double[]{70, 30});
    Envelope bounds = new EnvelopeImpl( positionA, positionB );
   
    // create expected ring
    DirectPosition one = new DirectPositionImpl( positionA );
    one.setOrdinate( 1, bounds.getMinimum(1) );
   
    DirectPosition two = new DirectPositionImpl( positionB );
    two.setOrdinate( 1, bounds.getMinimum(1) );
   
    DirectPosition three = new DirectPositionImpl( two );
    three.setOrdinate( 1, bounds.getMaximum(1) );
   
    DirectPosition four = new DirectPositionImpl( one );
    four.setOrdinate( 1, bounds.getMaximum(1) );
   
    LineSegment edge1 = new LineSegmentImpl( one, two, 0.0 );
    LineSegment edge2 = new LineSegmentImpl( two, three, 0.0 );
    LineSegment edge3 = new LineSegmentImpl( three, four, 0.0 );
    LineSegment edge4 = new LineSegmentImpl( four, one, 0.0 );
View Full Code Here

Examples of org.geotools.geometry.iso.coordinate.EnvelopeImpl

    String toS = b2.toString();
    assertTrue(toS != null);
    assertTrue(toS.length() > 0);
   
    // test getEnvelope
    EnvelopeImpl env = b2.getEnvelope();
    EnvelopeImpl exp_env = new EnvelopeImpl(dp1, dp2);
    assertTrue(env.equals(exp_env));
   
    // test isSimple
    assertTrue(b2.isSimple());
View Full Code Here

Examples of org.geotools.geometry.iso.coordinate.EnvelopeImpl

    if (!ci.hasNext())
      throw new IllegalArgumentException("Curve has no elements."); //$NON-NLS-1$
    CurveImpl c0 = (CurveImpl) ci.next();
    ;
    //this.envelope = new EnvelopeImpl(c0.getEnvelope());
    this.envelope = new EnvelopeImpl(c0.getEnvelope());
    while (ci.hasNext()) {
      CurveImpl c1 = (CurveImpl) ci.next();
      this.envelope.expand(c1.getEnvelope());
     
      DirectPosition startPoint = c1.getStartPoint();
View Full Code Here

Examples of org.geotools.geometry.iso.coordinate.EnvelopeImpl

    if (!surfIter.hasNext())
      return null;
   
    Surface actSurf = (Surface) surfIter.next();
    /* Use envelope of the first Curve as base for the new envelope */
    EnvelopeImpl rEnv = new EnvelopeImpl(actSurf.getEnvelope());
    //EnvelopeImpl rEnv = this.getFeatGeometryFactory().getGeometryFactoryImpl().createEnvelope(actSurf.getEnvelope());
   
    /* Add envelopes of the other Curves */
    while (surfIter.hasNext()) {
      actSurf = (Surface) surfIter.next();
      rEnv.expand(actSurf.getEnvelope());
    }

    return rEnv;
  }
View Full Code Here

Examples of org.geotools.geometry.iso.coordinate.EnvelopeImpl

   *
   * @see org.geotools.geometry.featgeom.root.GeometryImpl#getEnvelope()
   */
  public Envelope getEnvelope() {
    /* Return envelope only consisting of this point */
    return new EnvelopeImpl(this.position);
    //return this.getGeometryFactory().getGeometryFactoryImpl().createEnvelope(this.position.getCoordinates());
  }
View Full Code Here

Examples of org.geotools.geometry.iso.coordinate.EnvelopeImpl

    this.patch = newPatchList;

    // Build the envelope for the Surface based on the SurfacePatch envelopes
    SurfacePatchImpl tFirstPatch = (SurfacePatchImpl) patch.get(0);
    //this.envelope = new EnvelopeImpl(tFirstPatch.getEnvelope());
    this.envelope = new EnvelopeImpl(tFirstPatch.getEnvelope());
    for (SurfacePatch p : patch)
      ((EnvelopeImpl) this.envelope).expand(((SurfacePatchImpl) p)
          .getEnvelope());

  }
View Full Code Here

Examples of org.geotools.geometry.iso.coordinate.EnvelopeImpl

  public EnvelopeImpl getEnvelope() {
    // TODO Test
    /* Build Envelope with StartPoint */
    // EnvelopeImpl tmpEnv = new EnvelopeImpl(this.startPoint.getDirectPosition(), this.startPoint.getDirectPosition());
   
    EnvelopeImpl tmpEnv = new EnvelopeImpl(this.startPoint.getEnvelope());
    /* Extend Envelope with EndPoint */
    tmpEnv.expand(this.endPoint.getDirectPosition().getCoordinate());
    return tmpEnv;
  }
View Full Code Here

Examples of org.geotools.geometry.iso.coordinate.EnvelopeImpl

    tIM.set(Location.EXTERIOR, Location.EXTERIOR, 2);

    // if the Geometries don't overlap there is nothing to do
//    if (!arg[0].getGeometry().getEnvelopeInternal().intersects(
//        arg[1].getGeometry().getEnvelopeInternal())) {
    EnvelopeImpl env1 = (EnvelopeImpl) arg[0].getGeometry().getEnvelope();
    EnvelopeImpl env2 = (EnvelopeImpl) arg[1].getGeometry().getEnvelope();
    if (!env1.intersects(env2)) {
      computeDisjointIM(tIM);
      return tIM;
    }
    this.arg[0].computeSelfNodes(this.li, false);
View Full Code Here

Examples of org.geotools.geometry.iso.coordinate.EnvelopeImpl

    // set the curve envelope
    Iterator<? extends CurveSegment> it = segments.iterator();
    CurveSegmentImpl cs0 = (CurveSegmentImpl) it.next();
    cs0.setCurve(this);
    this.envelope = new EnvelopeImpl(cs0.getEnvelope());

    Position p0 = cs0.getStartPosition();

    // Änderung durch Sanjay, da in bisheriger Version nicht der Fall
    // berücksichtigt wurde, dass nur 1 CurveSegment existiert
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.