Package net.lucidviews.geoalgo.limb.data

Examples of net.lucidviews.geoalgo.limb.data.Options


    assertNull( processedIntersection );
  }
 
  public void testNullIntersectionWithNullNegligibleDistance()
  {
    Options options = new Options();
    Geometry processedIntersection = this.processor.processIntersection( null, options );
   
    // The processor should accept a null intersection and return a null result.
    assertNull( processedIntersection );
  }
View Full Code Here


    assertNull( processedIntersection );
  }
 
  public void testNullIntersectionWithNegligibleDistance()
  {
    Options options = new Options();
    options.setNegligibleDistance( 0.5 );
    Geometry processedIntersection = this.processor.processIntersection( null, options );
   
    // The processor should accept a null intersection and return a null result.
    assertNull( processedIntersection );
  }
View Full Code Here

    assertEquals( intersection, processedIntersection );
  }
 
  public void testEmptyIntersectionWithNullNegligibleDistance()
  {
    Options options = new Options();
    Geometry intersection = this.geometryFactory.createGeometryCollection( new Geometry[]{} );
    Geometry processedIntersection = this.processor.processIntersection( intersection, options );
   
    // With no negligible distance defined an empty intersection should be allowed through.
    assertEquals( intersection, processedIntersection );
View Full Code Here

    assertEquals( intersection, processedIntersection );
  }
 
  public void testEmptyIntersectionWithNegligibleDistance()
  {
    Options options = new Options();
    options.setNegligibleDistance( 0.5 );
    Geometry intersection = this.geometryFactory.createGeometryCollection( new Geometry[]{} );
    Geometry processedIntersection = this.processor.processIntersection( intersection, options );
   
    // The empty collection has zero length and should be voided.
    assertNull( processedIntersection );
View Full Code Here

    assertEquals( intersection, processedIntersection );
  }
 
  public void testZeroSizedIntersectionWithNullNegligibleDistance()
  {
    Options options = new Options();
    Geometry intersection = this.geometryFactory.createPoint( new Coordinate( 2000, 2000 ) );
    Geometry processedIntersection = this.processor.processIntersection( intersection, options );
   
    // With no negligible distance defined a zero-sized intersection should be allowed through.
    assertEquals( intersection, processedIntersection );
View Full Code Here

    assertEquals( intersection, processedIntersection );
  }
 
  public void testZeroSizedIntersectionWithNegligibleDistance()
  {
    Options options = new Options();
    options.setNegligibleDistance( 0.5 );
    Geometry intersection = this.geometryFactory.createPoint( new Coordinate( 2000, 2000 ) );
    Geometry processedIntersection = this.processor.processIntersection( intersection, options );
   
    // The zero-sized geometry should be voided.
    assertNull( processedIntersection );
View Full Code Here

  {
    // Two lines whose combined length is 20.
    LineString line1 = this.geometryFactory.createLineString( LimbGeneratorTest.Utils.createCoords( "0 0, 10 0" ) );
    LineString line2 = this.geometryFactory.createLineString( LimbGeneratorTest.Utils.createCoords( "10 0, 10 10" ) );
   
    Options options = new Options();
    options.setNegligibleDistance( 15.0 );
   
    Geometry intersection = this.geometryFactory.createMultiLineString( new LineString[]{ line1, line2 } );
    Geometry processedIntersection = this.processor.processIntersection( intersection, options );
   
    // The two lines have a combined length greater than the negligible distance.
View Full Code Here

    LineString line1 = this.geometryFactory.createLineString( LimbGeneratorTest.Utils.createCoords( "0 0, 10 0" ) );
    LineString line2 = this.geometryFactory.createLineString( LimbGeneratorTest.Utils.createCoords( "10 0, 10 10" ) );
    Geometry point1 = this.geometryFactory.createPoint( new Coordinate( 2000, 2000 ) );
    Geometry point2 = this.geometryFactory.createPoint( new Coordinate( 1000, 1000 ) );
   
    Options options = new Options();
    options.setNegligibleDistance( 20.0 );
   
    Geometry intersection = this.geometryFactory.createGeometryCollection( new Geometry[]{ line1, point1, line2, point2 } );
    Geometry processedIntersection = this.processor.processIntersection( intersection, options );
   
    // The two lines have a combined length smaller than the negligible distance and should be voided.
View Full Code Here

    LineString line1 = this.geometryFactory.createLineString( LimbGeneratorTest.Utils.createCoords( "0 0, 10 0" ) );
    LineString line2 = this.geometryFactory.createLineString( LimbGeneratorTest.Utils.createCoords( "10 0, 10 10" ) );
    Geometry point1 = this.geometryFactory.createPoint( new Coordinate( 2000, 2000 ) );
    Geometry point2 = this.geometryFactory.createPoint( new Coordinate( 1000, 1000 ) );
   
    Options options = new Options();
    options.setNegligibleDistance( 19.999 );
   
    Geometry intersection = this.geometryFactory.createGeometryCollection( new Geometry[]{ line1, point1, line2, point2 } );
    Geometry processedIntersection = this.processor.processIntersection( intersection, options );
   
    // The two lines have a combined length greater than the negligible distance.
View Full Code Here

    Point point = this.geometryFactory.createPoint( new Coordinate( x, y ) );
   
    Limb limb = new Limb();
    limb.setIntersection( point );
   
    Options options = new Options();
    options.setScreenSize( this.halfScreenSize );
   
    PositionAssignmentLimbRefiner testObj = new PositionAssignmentLimbRefiner();
    testObj.refine( limb, this.defaultView, options );
   
    assertNotNull( limb.getPosition() );
View Full Code Here

TOP

Related Classes of net.lucidviews.geoalgo.limb.data.Options

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.