Skip to content

Commit

Permalink
Merge pull request #403 from ngageoint/GEOWAVE-398
Browse files Browse the repository at this point in the history
GEOWAVE-398 & GEOWAVE-401.  DWITHIN corrected to handle the unit conv…
  • Loading branch information
rwgdrummer committed May 28, 2015
2 parents 5c80cf6 + f436d0b commit 8918fbf
Show file tree
Hide file tree
Showing 8 changed files with 946 additions and 137 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,9 @@ public DataStatistics<T> duplicate() {
newStats.fromBinary(toBinary());
return newStats;
}

@Override
public String toString() {
return "AbstractDataStatistics [dataAdapterId=" + dataAdapterId.getString() + ", statisticsId=" + statisticsId.getString() + "]";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import mil.nga.giat.geowave.core.geotime.GeometryUtils;

import org.apache.commons.lang3.tuple.Pair;
import org.apache.log4j.Logger;
import org.geotools.filter.visitor.NullFilterVisitor;
import org.geotools.geometry.jts.ReferencedEnvelope;
Expand Down Expand Up @@ -307,13 +308,29 @@ public Object visit(
if (geom == null) {
return infinity();
}
geom = geom.buffer(filter.getDistance());
Pair<Geometry, Double> geometryAndDegrees;
try {
geometryAndDegrees = mil.nga.giat.geowave.adapter.vector.utils.GeometryUtils.buffer(
crs,
geom,
filter.getDistanceUnits(),
filter.getDistance());
}
catch (TransformException e) {
LOGGER.error(
"Cannot transform geometry to CRS",
e);
geometryAndDegrees = Pair.of(
geom,
filter.getDistance());
}

if (bbox != null) {
return geom.union(bbox);
return geometryAndDegrees.getLeft().union(
bbox);
}
else {
return geom;
return geometryAndDegrees.getLeft();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@ public static String toCQL(
new StringBuilder());

return output.toString();

}
}
Loading

0 comments on commit 8918fbf

Please sign in to comment.