Merge "Issue #1625 Updated addOrRemoveCounty method." into development
Former-commit-id:e54eb4ab55
[formerlye024e4e087
] [formerly7f769af427
[formerly cda14b7c5e6563a9165fa734f35766816bccccf1]] Former-commit-id:7f769af427
Former-commit-id:0125935a7f
This commit is contained in:
commit
444a1f5d47
1 changed files with 12 additions and 12 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Reference in a new issue