Issue #1625 Updated addOrRemoveCounty method.

Former-commit-id: 4ee3a8d412 [formerly f59a08963c] [formerly cd6dd3c178] [formerly 4ee3a8d412 [formerly f59a08963c] [formerly cd6dd3c178] [formerly 8c2c7c97f7 [formerly cd6dd3c178 [formerly 18760c0895c1776dd0448b0bb699ab5506c45511]]]]
Former-commit-id: 8c2c7c97f7
Former-commit-id: c62a02700a [formerly c861c71ae6] [formerly 98a2ef23744e01ccb963e6b3513b3786a6c91d5c [formerly d4f4832d1a]]
Former-commit-id: d0efdc1424c72f849de83750a953e3605ddf5aac [formerly b275cdf701]
Former-commit-id: f0a64fa33f
This commit is contained in:
Jonathan Sanchez 2013-02-25 17:15:09 -06:00
parent a9e237eaca
commit c6800cbf49

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));