ASM #663 - WarnGen does not properly handle Outer Banks Counties in North Carolina

Change-Id: If7fbcea362618e0dea5153f65489388b406b7a81

Former-commit-id: 1d52d020eb [formerly 1180b31875 [formerly 1200633cd2] [formerly 1d52d020eb [formerly 4d50beaed59d785d923e357f8ce036f6625ce4b4]]]
Former-commit-id: 1180b31875 [formerly 1200633cd2]
Former-commit-id: 1180b31875
Former-commit-id: 660d1c9ff2
This commit is contained in:
Qinglu.Lin 2014-06-30 13:08:49 -04:00
parent 279aa9d039
commit 012e92eda4

View file

@ -76,6 +76,7 @@ import com.vividsolutions.jts.geom.prep.PreparedGeometry;
* Aug 19, 2013 2177 jsanchez Used portionsUtil to calculate area portion descriptions.
* Apr 29, 2014 3033 jsanchez Updated method to retrieve files in localization.
* May 16, 2014 DR 17365 D. Friedman Reduce precision of warning area to avoid topology errors.
* Jun 30, 2014 DR 17447 Qinglu lin Updated findAffectedAreas().
* </pre>
*
* @author chammack
@ -178,6 +179,7 @@ public class Area {
}
List<String> uniqueFips = new ArrayList<String>();
List<String> uniqueCountyname = new ArrayList<String>();
List<AffectedAreas> areas = new ArrayList<AffectedAreas>();
for (GeospatialData regionFeature : countyMap.values()) {
Geometry regionGeom = regionFeature.geometry;
@ -257,8 +259,12 @@ public class Area {
area.points = pointList.toArray(new String[pointList.size()]);
}
if (uniqueFips.contains(area.fips) == false) {
String countyName = (String)regionFeature.attributes.get("COUNTYNAME");
if (uniqueFips.contains(area.fips) == false || !uniqueCountyname.contains(countyName)) {
uniqueFips.add(area.fips);
if (countyName != null) {
uniqueCountyname.add(countyName);
}
areas.add(area);
}
}