Skip to content
This repository was archived by the owner on May 27, 2024. It is now read-only.

Commit 7cf369c

Browse files
committed
Routes: group stop_positions & platforms in the routes/relations for PTv2
1 parent b10d999 commit 7cf369c

File tree

9 files changed

+365
-92
lines changed

9 files changed

+365
-92
lines changed

GO_Sync/src/main/java/edu/usf/cutr/go_sync/gui/MainForm.form

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@
12081208
<Properties>
12091209
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
12101210
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
1211-
<TitledBorder title="Route members options"/>
1211+
<TitledBorder title="Route members options (applies only to PTv2 relations)"/>
12121212
</Border>
12131213
</Property>
12141214
</Properties>
@@ -1225,18 +1225,26 @@
12251225
<Component class="javax.swing.JCheckBox" name="skipNodesWithRoleEmptyCb">
12261226
<Properties>
12271227
<Property name="selected" type="boolean" value="true"/>
1228-
<Property name="text" type="java.lang.String" value="Remove nodes with empty role (required for PTv2)"/>
1228+
<Property name="text" type="java.lang.String" value="Remove nodes having empty role (mandatory for PTv2)"/>
1229+
<Property name="enabled" type="boolean" value="false"/>
12291230
</Properties>
12301231
</Component>
12311232
<Component class="javax.swing.JCheckBox" name="skipNodesWithRoleStopCb">
12321233
<Properties>
1233-
<Property name="text" type="java.lang.String" value="Remove nodes with role &apos;stop&apos; (only if PTv2 is enabled)"/>
1234+
<Property name="text" type="java.lang.String" value="Remove all nodes having role &apos;stop&apos;"/>
12341235
<Property name="actionCommand" type="java.lang.String" value="Remove nodes with &apos;stop&apos; role"/>
12351236
</Properties>
12361237
</Component>
1238+
<Component class="javax.swing.JCheckBox" name="skipNodesWithRoleStopWithoutMatchinPlatformCb">
1239+
<Properties>
1240+
<Property name="selected" type="boolean" value="true"/>
1241+
<Property name="text" type="java.lang.String" value="Remove nodes having role &apos;stop&apos; that don&apos;t match a platform (recommended)"/>
1242+
</Properties>
1243+
</Component>
12371244
<Component class="javax.swing.JCheckBox" name="removePlatformsNotInGtfsFromOSMRelationCb">
12381245
<Properties>
1239-
<Property name="text" type="java.lang.String" value="Remove platform nodes without Gtfs match (only if PTv2 is enabled)"/>
1246+
<Property name="selected" type="boolean" value="true"/>
1247+
<Property name="text" type="java.lang.String" value="Remove platforms without Gtfs match (recommended)"/>
12401248
</Properties>
12411249
</Component>
12421250
</SubComponents>
@@ -2896,7 +2904,7 @@
28962904
<Component id="revertChangesetField" alignment="3" min="-2" max="-2" attributes="1"/>
28972905
<Component id="changesetLabel" alignment="3" min="-2" max="-2" attributes="1"/>
28982906
</Group>
2899-
<EmptySpace pref="373" max="32767" attributes="0"/>
2907+
<EmptySpace pref="376" max="32767" attributes="0"/>
29002908
<Component id="revertButton" min="-2" max="-2" attributes="0"/>
29012909
<EmptySpace min="-2" max="-2" attributes="0"/>
29022910
</Group>

GO_Sync/src/main/java/edu/usf/cutr/go_sync/gui/MainForm.java

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ private void initComponents() {
208208
routeMemberOptionPanel = new javax.swing.JPanel();
209209
skipNodesWithRoleEmptyCb = new javax.swing.JCheckBox();
210210
skipNodesWithRoleStopCb = new javax.swing.JCheckBox();
211+
skipNodesWithRoleStopWithoutMatchinPlatformCb = new javax.swing.JCheckBox();
211212
removePlatformsNotInGtfsFromOSMRelationCb = new javax.swing.JCheckBox();
212213
gtfsDataPanel = new javax.swing.JPanel();
213214
rbURL = new javax.swing.JRadioButton();
@@ -443,18 +444,24 @@ private void initComponents() {
443444
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
444445
optionsPanel.add(routeOptionsPanel, gridBagConstraints);
445446

446-
routeMemberOptionPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Route members options"));
447+
routeMemberOptionPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Route members options (applies only to PTv2 relations)"));
447448
routeMemberOptionPanel.setLayout(new javax.swing.BoxLayout(routeMemberOptionPanel, javax.swing.BoxLayout.Y_AXIS));
448449

449450
skipNodesWithRoleEmptyCb.setSelected(true);
450-
skipNodesWithRoleEmptyCb.setText("Remove nodes with empty role (required for PTv2)");
451+
skipNodesWithRoleEmptyCb.setText("Remove nodes having empty role (mandatory for PTv2)");
452+
skipNodesWithRoleEmptyCb.setEnabled(false);
451453
routeMemberOptionPanel.add(skipNodesWithRoleEmptyCb);
452454

453-
skipNodesWithRoleStopCb.setText("Remove nodes with role 'stop' (only if PTv2 is enabled)");
455+
skipNodesWithRoleStopCb.setText("Remove all nodes having role 'stop'");
454456
skipNodesWithRoleStopCb.setActionCommand("Remove nodes with 'stop' role");
455457
routeMemberOptionPanel.add(skipNodesWithRoleStopCb);
456458

457-
removePlatformsNotInGtfsFromOSMRelationCb.setText("Remove platform nodes without Gtfs match (only if PTv2 is enabled)");
459+
skipNodesWithRoleStopWithoutMatchinPlatformCb.setSelected(true);
460+
skipNodesWithRoleStopWithoutMatchinPlatformCb.setText("Remove nodes having role 'stop' that don't match a platform (recommended)");
461+
routeMemberOptionPanel.add(skipNodesWithRoleStopWithoutMatchinPlatformCb);
462+
463+
removePlatformsNotInGtfsFromOSMRelationCb.setSelected(true);
464+
removePlatformsNotInGtfsFromOSMRelationCb.setText("Remove platforms without Gtfs match (recommended)");
458465
routeMemberOptionPanel.add(removePlatformsNotInGtfsFromOSMRelationCb);
459466

460467
gridBagConstraints = new java.awt.GridBagConstraints();
@@ -672,7 +679,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
672679
.addGroup(revertChangesetPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
673680
.addComponent(revertChangesetField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
674681
.addComponent(changesetLabel))
675-
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 373, Short.MAX_VALUE)
682+
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 376, Short.MAX_VALUE)
676683
.addComponent(revertButton)
677684
.addContainerGap())
678685
);
@@ -787,19 +794,23 @@ private void compareButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN
787794
processingOptions.add(ProcessingOptions.SKIP_GTFS_STATIONS);
788795
}
789796
if (skipNodesWithRoleEmptyCb.isSelected()) {
790-
processingOptions.add(ProcessingOptions.SKIP_NODES_WITH_ROLE_EMPTY);
797+
processingOptions.add(ProcessingOptions.SKIP_NODES_HAVING_ROLE_EMPTY);
791798
}
792799
if (createAsPTv2Cb.isSelected()) {
793800
processingOptions.add(ProcessingOptions.CREATE_ROUTE_AS_PTV2);
801+
processingOptions.add(ProcessingOptions.SKIP_NODES_HAVING_ROLE_EMPTY);
794802
}
795803
if (removePlatformsNotInGtfsFromOSMRelationCb.isSelected()) {
796-
processingOptions.add(ProcessingOptions.REMOVE_PLATFORMS_NOT_IN_GTFS_TRIP_FROM_OSM_RELATION);
804+
processingOptions.add(ProcessingOptions.SKIP_NODES_HAVING_ROLE_PLATFORM_NOT_IN_GTFS_TRIP_FROM_OSM_RELATION);
797805
}
798806
if (dontReplaceExistingOSMRouteColorCb.isSelected()) {
799807
processingOptions.add(ProcessingOptions.DONT_REPLACE_EXISING_OSM_ROUTE_COLOR);
800808
}
801809
if (skipNodesWithRoleStopCb.isSelected()) {
802-
processingOptions.add(ProcessingOptions.SKIP_NODES_WITH_ROLE_STOP);
810+
processingOptions.add(ProcessingOptions.SKIP_NODES_HAVING_ROLE_STOP_ALL);
811+
}
812+
if (skipNodesWithRoleStopWithoutMatchinPlatformCb.isSelected()) {
813+
processingOptions.add(ProcessingOptions.SKIP_NODES_HAVING_ROLE_STOP_WITHOUT_MATCHING_PLATFORM);
803814
}
804815
if (dontAddGtfsRouteTextColorCb.isSelected()) {
805816
processingOptions.add(ProcessingOptions.DONT_ADD_GTFS_ROUTE_TEXT_COLOR_TO_ROUTE);
@@ -1121,6 +1132,7 @@ public void propertyChange(PropertyChangeEvent evt) {
11211132
private javax.swing.JCheckBox skipGtfsStationsCb;
11221133
private javax.swing.JCheckBox skipNodesWithRoleEmptyCb;
11231134
private javax.swing.JCheckBox skipNodesWithRoleStopCb;
1135+
private javax.swing.JCheckBox skipNodesWithRoleStopWithoutMatchinPlatformCb;
11241136
private javax.swing.JPanel stopOptionsPanel;
11251137
private javax.swing.JTextArea taskOutput;
11261138
private javax.swing.JLabel threshold_label;

0 commit comments

Comments
 (0)