Merge "Issue #1625 Updated addOrRemoveCounty method." into development

Former-commit-id: e54eb4ab55 [formerly e024e4e087] [formerly e54eb4ab55 [formerly e024e4e087] [formerly 7f769af427 [formerly cda14b7c5e6563a9165fa734f35766816bccccf1]]]
Former-commit-id: 7f769af427
Former-commit-id: 444a1f5d47 [formerly 0125935a7f]
Former-commit-id: 8af64a568d
This commit is contained in:
Lee Venable 2013-02-25 17:25:56 -06:00 committed by Gerrit Code Review
commit de7c07dcab

View file

@ -2278,21 +2278,21 @@ public class WarngenLayer extends AbstractStormTrackResource {
if (fipsIds.contains(featureFips) == false) {
break;
} else if (oldWarningPolygon.contains(point) == true) {
boolean first = true;
// Get intersecting parts for each geom with
// matching fips
List<Geometry> fipsParts = new ArrayList<Geometry>(
dataWithFips.size());
for (GeospatialData g : dataWithFips) {
if (first) {
geom = GeometryUtil.intersection(
g.geometry, oldWarningArea);
first = false;
} else {
geom = GeometryUtil.intersection(
g.geometry, geom);
}
fipsParts.add(GeometryUtil.intersection(
oldWarningArea, g.geometry));
}
// Create a collection of each part
geom = GeometryUtil.union(fipsParts
.toArray(new Geometry[0]));
if (warningPolygon.contains(point)) {
geom = GeometryUtil.intersection(geom,
warningPolygon);
// If inside warning polygon, intersect
geom = GeometryUtil.intersection(
warningPolygon, geom);
}
state.setWarningArea(GeometryUtil.union(
state.getWarningArea(), geom));