Issue #1625 Updated addOrRemoveCounty method.
Former-commit-id:4ee3a8d412
[formerlyf59a08963c
] [formerlycd6dd3c178
] [formerly4ee3a8d412
[formerlyf59a08963c
] [formerlycd6dd3c178
] [formerly8c2c7c97f7
[formerlycd6dd3c178
[formerly 18760c0895c1776dd0448b0bb699ab5506c45511]]]] Former-commit-id:8c2c7c97f7
Former-commit-id:c62a02700a
[formerlyc861c71ae6
] [formerly 98a2ef23744e01ccb963e6b3513b3786a6c91d5c [formerlyd4f4832d1a
]] Former-commit-id: d0efdc1424c72f849de83750a953e3605ddf5aac [formerlyb275cdf701
] Former-commit-id:f0a64fa33f
This commit is contained in:
parent
a9e237eaca
commit
c6800cbf49
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