Skip to content

Commit

Permalink
implemented FixMe interface from Atlas repo (osmlab#559)
Browse files Browse the repository at this point in the history
  • Loading branch information
reichg authored Jun 2, 2021
1 parent 51f7622 commit cd47184
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.openstreetmap.atlas.geography.atlas.items.Edge;
import org.openstreetmap.atlas.geography.atlas.walker.OsmWayWalker;
import org.openstreetmap.atlas.tags.BuildingTag;
import org.openstreetmap.atlas.tags.FixMeTag;
import org.openstreetmap.atlas.tags.HighwayTag;
import org.openstreetmap.atlas.tags.PlaceTag;
import org.openstreetmap.atlas.tags.SurfaceTag;
Expand Down Expand Up @@ -42,8 +43,6 @@ public class FixMeReviewCheck extends BaseCheck<Long>
private final List<String> fixMeSupportedValues;
private final HighwayTag minHighwayTag;
private static final String MIN_HIGHWAY_TAG_DEFAULT = "tertiary";
private static final String FIX_ME_LOWERCASE = "fixme";
private static final String FIX_ME_UPPERCASE = "FIXME";

/**
* instantiate config values
Expand Down Expand Up @@ -74,7 +73,7 @@ public boolean validCheckForObject(final AtlasObject object)
{
final Map<String, String> tags = object.getTags();
return !isFlagged(object.getOsmIdentifier())
&& (tags.containsKey(FIX_ME_UPPERCASE) || tags.containsKey(FIX_ME_LOWERCASE));
&& (tags.containsKey(FixMeTag.KEY) || tags.containsKey(FixMeTag.KEY.toUpperCase()));
}

/**
Expand Down Expand Up @@ -127,10 +126,10 @@ private boolean featureHasPriorityFixMeValues(final Map<String, String> tags)
{
for (final String priorityTagValue : this.fixMeSupportedValues)
{
if ((tags.containsKey(FIX_ME_UPPERCASE)
&& tags.get(FIX_ME_UPPERCASE).equals(priorityTagValue))
|| (tags.containsKey(FIX_ME_LOWERCASE)
&& tags.get(FIX_ME_LOWERCASE).equals(priorityTagValue)))
if ((tags.containsKey(FixMeTag.KEY.toUpperCase())
&& tags.get(FixMeTag.KEY.toUpperCase()).equals(priorityTagValue))
|| (tags.containsKey(FixMeTag.KEY)
&& tags.get(FixMeTag.KEY).equals(priorityTagValue)))
{
return true;
}
Expand Down

0 comments on commit cd47184

Please sign in to comment.