## com.bbn.openmap.geo
Class BoundaryCrossing

    java.lang.Object
      com.bbn.openmap.geo.BoundaryCrossing

public class BoundaryCrossing
extends java.lang.Object

The BoundaryCrossing class represents a location where a path crosses a region. Since a location can represent a region being left and a region being entered, you can ask it for the out GeoRegion and the in GeoRegion. Both won't be null at the same time, but either may be.

Author:
  dietrick

Nested Class Summary
`static class` `BoundaryCrossing.Collector` A Collector is an object that organizes boundary crossings, as discovered by CrossingIntersection class.
`static class` `BoundaryCrossing.CrossingIntersection` A Intersection class that knows how to call BoundaryCrossing.Collector to keep track of the path's relationship with the regions.

Field Summary
`protected Geo` `geo` The Geo location of the crossing.
`protected GeoRegion` `in` The GeoRegion that is being entered.
`protected GeoRegion` `out` The GeoRegion that is being exited.

Constructor Summary
`protected` `BoundaryCrossing(Geo p, GeoRegion r, boolean goinin)` Creates the BoundaryCrossing.

Method Summary
`static BoundaryCrossing.Collector` `getCrossings(GeoPath path, java.util.Collection regions)` The main factory method to create BoundaryCrossings.
`Geo` `getGeo()`
`GeoRegion` `getIn()`
`GeoRegion` `getOut()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### geo

    protected Geo geo

  The Geo location of the crossing.

### in

    protected GeoRegion in

  The GeoRegion that is being entered.

### out

    protected GeoRegion out

  The GeoRegion that is being exited.

Constructor Detail

### BoundaryCrossing

    protected BoundaryCrossing(Geo p,
                               GeoRegion r,
                               boolean goinin)

  Creates the BoundaryCrossing. The getCrossings() factory method will result in BoundaryCrossings being created.

Parameters:
  `p` - The Geo location
  `r` - the GeoRegion being entered/exited
  `goinin` - whether the path is goin' in to the region.

Method Detail

### getGeo

    public Geo getGeo()

### getIn

    public GeoRegion getIn()

### getOut

    public GeoRegion getOut()

### getCrossings

    public static BoundaryCrossing.Collector getCrossings(GeoPath path,
                                                          java.util.Collection regions)

  The main factory method to create BoundaryCrossings. Provides a BoundaryCrossing.Collector so that crossing points can be retrieved, as well as an iterator over regions intersected.

  Parameters:
    `path` - GeoPath to travel over
    `regions` - An ExtentIndex filled with GeoRegions.
  Returns:
    BoundaryCrossing.Collector

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details