Skip to content

Commit

Permalink
Reorganize classes for minor and tracks
Browse files Browse the repository at this point in the history
  • Loading branch information
AndriusGeo committed Apr 13, 2024
1 parent a5ec17c commit b7eef6f
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 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,20 +34,16 @@ 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) {
addTransportationFeature(FieldValue.CLASS_MINOR, null, 12, sf, features);
} else if (tipas == 10 || tipas == 11) {
addTransportationFeature(FieldValue.CLASS_TRACK, null, 14, sf, features);
addTransportationFeature(FieldValue.CLASS_TRACK, null, 13, sf, features);
} else if (tipas == 13) {
addTransportationFeature(FieldValue.CLASS_PATH, null, 14, sf, features);
} else if (tipas == 14) {
Expand Down

0 comments on commit b7eef6f

Please sign in to comment.