function test_MAX_geoIsRegionPartlyWithinRegion()
 {
     $this->assertFalse(MAX_geoIsRegionPartlyWithinRegion($this->newRegion(-10.0, -4.0, -3.0, -2.0), $this->newRegion(-3.0, -2.0, 4.0, 6.0)));
     $this->assertTrue(MAX_geoIsRegionPartlyWithinRegion($this->newRegion(-10.0, -4.0, -3.0, -2.0), $this->newRegion(-4.0, -2.0, -2.0, 6.0)));
     $this->assertFalse(MAX_geoIsRegionPartlyWithinRegion($this->newRegion(-10.0, -4.0, -3.0, -2.0), $this->newRegion(-8.0, -6.0, -2.6, 1.3)));
     $this->assertTrue(MAX_geoIsRegionPartlyWithinRegion($this->newRegion(-8.0, -6.0, -2.6, 1.3), $this->newRegion(-10.0, -4.0, -3.0, -2.0)));
     $this->assertTrue(MAX_geoIsRegionPartlyWithinRegion($this->newRegion(-8.0, -6.0, -2.6, -2.3), $this->newRegion(-10.0, -4.0, -3.0, -2.0)));
 }
Exemplo n.º 2
0
function MAX_geoDoRegionsHaveCommonPart($region1, $region2)
{
    return MAX_geoIsRegionPartlyWithinRegion($region1, $region2) || MAX_geoIsRegionPartlyWithinRegion($region2, $region1);
}