Issue #1625 Updated addOrRemoveCounty method.
Former-commit-id:f59a08963c
[formerlycd6dd3c178
] [formerlyf59a08963c
[formerlycd6dd3c178
] [formerly8c2c7c97f7
[formerly 18760c0895c1776dd0448b0bb699ab5506c45511]]] Former-commit-id:8c2c7c97f7
Former-commit-id:c861c71ae6
[formerlyd4f4832d1a
] Former-commit-id:b275cdf701
This commit is contained in:
parent
36b5228641
commit
f0a64fa33f
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