Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
westnordost committed May 31, 2020
2 parents 9748840 + f9f2b3b commit cc27045
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,21 +86,21 @@ class OsmQuestDownloader @Inject constructor(
if (geometry is ElementPolylinesGeometry) {
val totalLength = geometry.polylines.sumByDouble { it.measuredLength() }
if (totalLength > MAX_GEOMETRY_LENGTH_IN_METERS) {
Log.d(TAG, "$questTypeName: Not adding a quest at ${pos.toLogString()} because the geometry is too long")
Log.d(TAG, "$questTypeName: Not adding a quest for ${element.toLogString()} at ${pos.toLogString()} because the geometry is too long")
return false
}
}

// do not create quests whose marker is at/near a blacklisted position
if (blacklistedPositions.contains(pos.truncateTo5Decimals())) {
Log.d(TAG, "$questTypeName: Not adding a quest at ${pos.toLogString()} because there is a note at that position")
Log.d(TAG, "$questTypeName: Not adding a quest for ${element.toLogString()} at ${pos.toLogString()} because there is a note at that position")
return false
}

// do not create quests in countries where the quest is not activated
val countries = questType.enabledInCountries
if (!countryBoundaries.isInAny(pos, countries)) {
Log.d(TAG, "$questTypeName: Not adding a quest at ${pos.toLogString()} because the quest is disabled in this country")
Log.d(TAG, "$questTypeName: Not adding a quest for ${element.toLogString()} at ${pos.toLogString()} because the quest is disabled in this country")
return false
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import de.westnordost.streetcomplete.data.osm.mapdata.OverpassMapDataAndGeometry

class AddCrossingType(o: OverpassMapDataAndGeometryApi) : SimpleOverpassQuestType<String>(o) {

override val tagFilters = "nodes with highway = crossing and (!crossing or crossing = island)"
override val tagFilters = "nodes with highway = crossing and (!crossing or crossing = island) and foot!=no"
override val commitMessage = "Add crossing type"
override val wikiLink = "Key:crossing"
override val icon = R.drawable.ic_quest_pedestrian_crossing
Expand Down

0 comments on commit cc27045

Please sign in to comment.