Skip to content
This repository was archived by the owner on Aug 12, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<groupId>org.transitopia</groupId>
<artifactId>planetiler-transitopia</artifactId>
<version>24.01.01</version>
<version>25.08.10</version>

<name>Transitopia Vector Tile Schema implementation for Planetiler tool</name>

Expand Down
3 changes: 0 additions & 3 deletions src/main/java/org/transitopia/TransitopiaCyclingProfile.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import com.onthegomap.planetiler.reader.osm.OsmElement;
import com.onthegomap.planetiler.stats.Stats;
import com.onthegomap.planetiler.util.Translations;
import java.util.List;
import org.transitopia.layers.Cycling;

/**
Expand All @@ -18,8 +17,6 @@
public class TransitopiaCyclingProfile extends ForwardingProfile {

public static final String OSM_SOURCE = "osm";
/** Index to efficiently find the imposm3 "table row" constructor from an OSM element based on its tags. */
// private final MultiExpression.Index<RowDispatch> osmMappings;

public TransitopiaCyclingProfile(Planetiler runner) {
this(runner.translations(), runner.config(), runner.stats());
Expand Down
13 changes: 6 additions & 7 deletions src/main/java/org/transitopia/layers/Cycling.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@


public class Cycling implements
ForwardingProfile.HandlerForLayer,
ForwardingProfile.FeaturePostProcessor,
ForwardingProfile.LayerPostProcessor,
ForwardingProfile.OsmRelationPreprocessor {

private final PlanetilerConfig config;
Expand Down Expand Up @@ -246,20 +245,20 @@ public List<VectorTile.Feature> postProcess(int zoom, List<VectorTile.Feature> i
double tolerance = config.tolerance(zoom);
double minLength = coalesce(MIN_LENGTH.apply(zoom), 0).doubleValue();

// don't merge road segments with oneway tag
// TODO merge preserving oneway instead ignoring
// don't merge road segments with "oneway" tag
// TODO: merge while preserving "oneway" instead ignoring
int onewayId = 1;
for (var item : items) {
var oneway = item.attrs().get("oneway");
var oneway = item.tags().get("oneway");
if (oneway instanceof Number n && n.intValue() == 1) {
item.attrs().put(LIMIT_MERGE_TAG, onewayId++);
item.tags().put(LIMIT_MERGE_TAG, onewayId++);
}
}

var merged = FeatureMerge.mergeLineStrings(items, minLength, tolerance, BUFFER_SIZE);

for (var item : merged) {
item.attrs().remove(LIMIT_MERGE_TAG);
item.tags().remove(LIMIT_MERGE_TAG);
}
return merged;
}
Expand Down