Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate tracks class #43

Merged
merged 2 commits into from
Apr 13, 2024
Merged
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
17 changes: 6 additions & 11 deletions vector/src/main/java/lt/lrv/basemap/layers/Transportation.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public void processFeature(SourceFeature sf, FeatureCollector features) {
if (sf.getSourceLayer().equals(Layer.GRPK_KELIAI)) {
var paskirtis = sf.getString("PASKIRTIS");
var tipas = sf.getLong("TIPAS");
var danga = sf.getString("DANGA");

if (tipas == 1) {
addTransportationFeature(FieldValue.CLASS_MOTORWAY, null, 2, sf, features);
Expand All @@ -35,21 +34,17 @@ public void processFeature(SourceFeature sf, FeatureCollector features) {
addTransportationFeature(FieldValue.CLASS_PRIMARY, null, 4, sf, features);
} else if (tipas == 3) {
addTransportationFeature(FieldValue.CLASS_SECONDARY, null, 8, sf, features);
} else if (tipas == 7 && (paskirtis.equals("JUNG") || paskirtis.equals("LEGR"))) {
addTransportationFeature(FieldValue.CLASS_SECONDARY, null, 12, sf, features);
} else if (tipas == 4) {
addTransportationFeature(FieldValue.CLASS_TERTIARY, null, 8, sf, features);
} else if (tipas == 6) {
// Gerosios vilties st. and other similar streets belong to tipas 6
// For now just assign service, because residential filters it out in some styles completely
} else if (tipas == 6 || tipas == 8) {
addTransportationFeature(FieldValue.CLASS_MINOR, null, 12, sf, features);
} else if (tipas == 7 && (paskirtis.equals("JUNG") || paskirtis.equals("LEGR"))) {
addTransportationFeature(FieldValue.CLASS_SECONDARY, null, 12, sf, features);
} else if (tipas == 7 || tipas == 9) {
addTransportationFeature(FieldValue.CLASS_SERVICE, null, 13, sf, features);
} else if (tipas == 8 && danga.equals("Ž")) {
addTransportationFeature(FieldValue.CLASS_PATH, null, 14, sf, features);
} else if (tipas == 8) {
addTransportationFeature(FieldValue.CLASS_SERVICE, null, 13, sf, features);
} else if (tipas == 10 || tipas == 11 || tipas == 13) {
} else if (tipas == 10 || tipas == 11) {
addTransportationFeature(FieldValue.CLASS_TRACK, null, 13, sf, features);
} else if (tipas == 13) {
addTransportationFeature(FieldValue.CLASS_PATH, null, 14, sf, features);
} else if (tipas == 14) {
addTransportationFeature(FieldValue.CLASS_FERRY, null, 13, sf, features);
Expand Down