Search in sources :

Example 1 with RayCrossingCounter

use of com.revolsys.geometry.algorithm.RayCrossingCounter in project com.revolsys.open by revolsys.

the class IndexedPointInAreaLocator method locate.

@Override
public Location locate(final double x, final double y) {
    final RayCrossingCounter visitor = new RayCrossingCounter(x, y);
    this.index.query(y, visitor);
    return visitor.getLocation();
}
Also used : RayCrossingCounter(com.revolsys.geometry.algorithm.RayCrossingCounter)

Example 2 with RayCrossingCounter

use of com.revolsys.geometry.algorithm.RayCrossingCounter in project com.revolsys.open by revolsys.

the class MCIndexedPointInAreaLocator method locate.

@Override
public Location locate(final double x, final double y) {
    final RayCrossingCounter rcc = new RayCrossingCounter(x, y);
    final MCSegmentCounter mcSegCounter = new MCSegmentCounter(rcc);
    final BoundingBox rayEnv = new BoundingBoxDoubleXY(x, y, this.maxXExtent, y);
    final List mcs = this.index.query(rayEnv);
    countSegs(rcc, rayEnv, mcs, mcSegCounter);
    return rcc.getLocation();
}
Also used : RayCrossingCounter(com.revolsys.geometry.algorithm.RayCrossingCounter) BoundingBox(com.revolsys.geometry.model.BoundingBox) List(java.util.List) BoundingBoxDoubleXY(com.revolsys.geometry.model.impl.BoundingBoxDoubleXY)

Aggregations

RayCrossingCounter (com.revolsys.geometry.algorithm.RayCrossingCounter)2 BoundingBox (com.revolsys.geometry.model.BoundingBox)1 BoundingBoxDoubleXY (com.revolsys.geometry.model.impl.BoundingBoxDoubleXY)1 List (java.util.List)1