use of org.opengis.geometry.BoundingBox in project GeoGig by boundlessgeo.
the class DiffBounds method _call.
@Override
protected DiffSummary<BoundingBox, BoundingBox> _call() {
checkArgument(cached && oldVersion == null || !cached, String.format("compare index allows only one revision to check against, got %s / %s", oldVersion, newVersion));
checkArgument(newVersion == null || oldVersion != null, "If new rev spec is specified then old rev spec is mandatory");
final String leftRefSpec = fromNullable(oldVersion).or(Ref.HEAD);
final String rightRefSpec = fromNullable(newVersion).or(cached ? Ref.STAGE_HEAD : Ref.WORK_HEAD);
RevTree left = resolveTree(leftRefSpec);
RevTree right = resolveTree(rightRefSpec);
ObjectDatabase leftSource = resolveSafeDb(leftRefSpec);
ObjectDatabase rightSource = resolveSafeDb(rightRefSpec);
PreOrderDiffWalk visitor = new PreOrderDiffWalk(left, right, leftSource, rightSource);
CoordinateReferenceSystem crs = resolveCrs();
BoundsWalk walk = new BoundsWalk(crs, stagingDatabase());
PreOrderDiffWalk.Consumer consumer = walk;
if (!pathFilters.isEmpty()) {
consumer = new PathFilteringDiffConsumer(pathFilters, walk);
}
visitor.walk(consumer);
DiffSummary<BoundingBox, BoundingBox> diffBounds = walk.getResult();
return diffBounds;
}
Aggregations