Skip to content

Commit

Permalink
Fix intersectionsCross3Test test for MVT tiles
Browse files Browse the repository at this point in the history
soundscape-backend was providing slightly different GeoJSON than MVT for
paths marked as pedestrian. This change fixes that so that instead of
being `highway=path` they are tagged `highway=pedestrian`. There may be
other tweaks needed here too, more testing required.
  • Loading branch information
davecraig committed Nov 15, 2024
1 parent b400bf1 commit f005490
Showing 1 changed file with 8 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -770,35 +770,27 @@ fun translateProperties(properties: HashMap<String, Any?>?, id: Double): HashMap
if (property.key == "class") {
//println("Class ${property.value}")
when (property.value) {
"crossing",
"service",
"secondary",
"tertiary",
"minor" -> {
foreign["feature_type"] = "highway"
foreign["feature_value"] = "unclassified"
}

"minor",
"track",
"path" -> {
foreign["feature_type"] = "highway"
foreign["feature_value"] = "path"
}

"path",
"primary" -> {
foreign["feature_type"] = "highway"
foreign["feature_value"] = "primary"
foreign["feature_value"] = property.value

if(properties["subclass"] == "pedestrian") {
foreign["feature_value"] = "pedestrian"
}
}

"bus" -> {
foreign["feature_type"] = "highway"
foreign["feature_value"] = "bus_stop"
}

"crossing" -> {
foreign["feature_type"] = "highway"
foreign["feature_value"] = "crossing"
}

else -> {
foreign["feature_type"] = property.value
}
Expand Down

0 comments on commit f005490

Please sign in to comment.