Changeset 18874 in osm for applications/editors
- Timestamp:
- 2009-11-30T13:51:30+01:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/addrinterpolation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/addrinterpolation/build.xml
r18503 r18874 89 89 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.AddrInterpolation.AddrInterpolationPlugin"/> 90 90 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/> 91 <attribute name="Plugin-Description" value="Group common Address Interpolation inputs in a single dialog, "/>91 <attribute name="Plugin-Description" value="Group common Address Interpolation inputs in a single dialog, as well as an option to automatically generate individual house number nodes from a Way."/> 92 92 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/AddrInterpolation"/> 93 <attribute name="Plugin-Mainversion" value="2 401"/>93 <attribute name="Plugin-Mainversion" value="2552"/> 94 94 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 95 95 </manifest> -
applications/editors/josm/plugins/addrinterpolation/src/org/openstreetmap/josm/plugins/AddrInterpolation/AddrInterpolationDialog.java
r18413 r18874 7 7 8 8 import java.awt.BorderLayout; 9 import java.awt.Checkbox; 9 10 import java.awt.Component; 10 11 import java.awt.Container; … … 46 47 import org.openstreetmap.josm.command.ChangePropertyCommand; 47 48 import org.openstreetmap.josm.command.Command; 49 import org.openstreetmap.josm.command.DeleteCommand; 48 50 import org.openstreetmap.josm.command.SequenceCommand; 51 import org.openstreetmap.josm.data.coor.LatLon; 49 52 import org.openstreetmap.josm.data.osm.DataSet; 50 53 import org.openstreetmap.josm.data.osm.Node; … … 57 60 58 61 /** 59 * 62 * 60 63 */ 61 64 … … 71 74 private ArrayList<Node> houseNumberNodes = null; // Additional nodes with addr:housenumber 72 75 76 private static String lastIncrement = ""; 77 private static int lastAccuracyIndex = 0; 73 78 private static String lastCity = ""; 74 79 private static String lastState = ""; … … 76 81 private static String lastCountry = ""; 77 82 private static String lastFullAddress = ""; 83 private static boolean lastConvertToHousenumber = false; 78 84 79 85 // Edit controls … … 83 89 private JTextField startTextField = null; 84 90 private JTextField endTextField = null; 91 private JTextField incrementTextField = null; 85 92 private JTextField cityTextField = null; 86 93 private JTextField stateTextField = null; … … 88 95 private JTextField countryTextField = null; 89 96 private JTextField fullTextField = null; 97 private Checkbox cbConvertToHouseNumbers = null; 90 98 91 99 private boolean relationChanged = false; // Whether to re-trigger data changed for relation … … 95 103 96 104 // NOTE: The following 2 arrays must match in number of elements and position 97 String[] addrInterpolationTags = { "odd", "even", "all", "alphabetic" }; // Tag values for map 98 String[] addrInterpolationStrings = { tr("Odd"), tr("Even"), tr("All"), tr("Alphabetic") }; // Translatable names for display 105 // Tag values for map (Except that 'Numeric' is replaced by actual # on map) 106 String[] addrInterpolationTags = { "odd", "even", "all", "alphabetic", "Numeric" }; 107 String[] addrInterpolationStrings = { tr("Odd"), tr("Even"), tr("All"), tr("Alphabetic"), tr("Numeric") }; // Translatable names for display 108 private final int NumericIndex = 4; 99 109 private JComboBox addrInterpolationList = null; 110 111 // NOTE: The following 2 arrays must match in number of elements and position 112 String[] addrInclusionTags = { "actual", "estimate", "potential" }; // Tag values for map 113 String[] addrInclusionStrings = { tr("Actual"), tr("Estimate"), tr("Potential") }; // Translatable names for display 114 private JComboBox addrInclusionList = null; 115 116 100 117 101 118 // For tracking edit changes as group for undo … … 121 138 122 139 dialog.add(editControlsPane); 123 dialog.setSize(new Dimension(300, 450));140 dialog.setSize(new Dimension(300,500)); 124 141 dialog.setLocation(new Point(100,300)); 125 142 … … 141 158 dialog.setVisible(true); 142 159 160 lastIncrement = incrementTextField.getText(); 143 161 lastCity = cityTextField.getText(); 144 162 lastState = stateTextField.getText(); … … 146 164 lastCountry = countryTextField.getText(); 147 165 lastFullAddress = fullTextField.getText(); 166 lastConvertToHousenumber = cbConvertToHouseNumbers.getState(); 148 167 149 168 } … … 195 214 addrInterpolationList = new JComboBox(addrInterpolationStrings); 196 215 216 JLabel incrementLabel = new JLabel(tr("Increment:")); 217 incrementTextField = new JTextField(lastIncrement, 100); 218 incrementTextField.setEnabled(false); 219 197 220 JLabel startLabel = new JLabel(tr("Starting #:")); 198 221 JLabel endLabel = new JLabel(tr("Ending #:")); … … 201 224 endTextField = new JTextField(10); 202 225 203 204 226 JLabel inclusionLabel = new JLabel(tr("Accuracy:")); 227 addrInclusionList = new JComboBox(addrInclusionStrings); 228 addrInclusionList.setSelectedIndex(lastAccuracyIndex); 205 229 206 230 // Preload any values already set in map … … 208 232 209 233 210 JLabel[] textLabels = {startLabel, endLabel, numberingLabel };211 Component[] editFields = {startTextField, endTextField, addrInterpolationList };234 JLabel[] textLabels = {startLabel, endLabel, numberingLabel, incrementLabel, inclusionLabel}; 235 Component[] editFields = {startTextField, endTextField, addrInterpolationList, incrementTextField, addrInclusionList}; 212 236 AddEditControlRows(textLabels, editFields, editControlsPane); 237 238 cbConvertToHouseNumbers = new Checkbox(tr("Convert way to individual house numbers."), null, lastConvertToHousenumber); 239 // cbConvertToHouseNumbers.setSelected(lastConvertToHousenumber); 213 240 214 241 // Address interpolation fields not valid if Way not selected … … 217 244 startTextField.setEnabled(false); 218 245 endTextField.setEnabled(false); 246 cbConvertToHouseNumbers.setEnabled(false); 219 247 } 220 248 … … 246 274 cityTextField.addKeyListener(enterProcessor); 247 275 addrInterpolationList.addKeyListener(enterProcessor); 276 incrementTextField.addKeyListener(enterProcessor); 248 277 249 278 … … 261 290 262 291 292 // Watch when Interpolation Method combo box is changed so that 293 // Numeric increment box can be enabled or disabled. 294 addrInterpolationList.addActionListener(new ActionListener() { 295 public void actionPerformed(ActionEvent e){ 296 int selectedIndex = addrInterpolationList.getSelectedIndex(); 297 incrementTextField.setEnabled(selectedIndex == NumericIndex); // Enable or disable numeric field 298 } 299 }); 300 301 302 editControlsPane.add(cbConvertToHouseNumbers, c); 303 304 263 305 264 306 if (houseNumberNodes.size() > 0) { … … 310 352 } 311 353 312 String selectedMethod = GetInterpolationMethod(); // Currently selected method 313 314 // String[] addrInterpolationTags = { "odd", "even", "all", "alphabetic" }; // Tag values for map 354 // String[] addrInterpolationTags = { "odd", "even", "all", "alphabetic", ### }; // Tag values for map 315 355 316 356 if (isLong(startValueString) && isLong(endValueString)) { … … 363 403 364 404 365 // Set Interpolation Method combo box to method specified by 'currentMethod' (an OSM key )405 // Set Interpolation Method combo box to method specified by 'currentMethod' (an OSM key value) 366 406 private void SelectInterpolationMethod(String currentMethod) { 367 407 int currentIndex = 0; 408 if (isLong(currentMethod)) { 409 // Valid number: Numeric increment method 410 currentIndex = addrInterpolationTags.length-1; 411 incrementTextField.setText(currentMethod); 412 incrementTextField.setEnabled(true); 413 } 414 else { 415 // Must scan OSM key values because combo box is already loaded with translated strings 416 for (int i=0; i<addrInterpolationTags.length; i++) { 417 if (addrInterpolationTags[i].equals(currentMethod)) { 418 currentIndex = i; 419 break; 420 } 421 } 422 } 423 addrInterpolationList.setSelectedIndex(currentIndex); 424 425 } 426 427 428 // Set Inclusion Method combo box to method specified by 'currentMethod' (an OSM key value) 429 private void SelectInclusion(String currentMethod) { 430 int currentIndex = 0; 368 431 // Must scan OSM key values because combo box is already loaded with translated strings 369 for (int i=0; i<addrIn terpolationTags.length; i++) {370 if (addrIn terpolationTags[i].equals(currentMethod)) {432 for (int i=0; i<addrInclusionTags.length; i++) { 433 if (addrInclusionTags[i].equals(currentMethod)) { 371 434 currentIndex = i; 372 435 break; 373 436 } 374 437 } 375 addrIn terpolationList.setSelectedIndex(currentIndex);438 addrInclusionList.setSelectedIndex(currentIndex); 376 439 377 440 } … … 455 518 SelectInterpolationMethod(currentMethod); 456 519 interpolationMethodSet = true; // Don't auto detect over a previous choice 520 } 521 522 String currentInclusion = addrInterpolationWay.get("addr:inclusion"); 523 if (currentInclusion != null) { 524 SelectInclusion(currentInclusion); 457 525 } 458 526 … … 677 745 678 746 679 // Test for valid long int 747 748 // For Alpha interpolation, return base string 749 // For example: "22A" -> "22" 750 // For example: "A" -> "" 751 // Input string must not be empty 752 private String BaseAlpha(String strValue) { 753 if (strValue.length() > 0) { 754 return strValue.substring(0, strValue.length()-1); 755 } 756 else { 757 return ""; 758 } 759 } 760 761 762 private char LastChar(String strValue) { 763 if (strValue.length() > 0) { 764 return strValue.charAt(strValue.length()-1); 765 } 766 else { 767 return 0; 768 } 769 } 770 771 772 // Test for valid positive long int 680 773 private boolean isLong( String input ) 681 774 { 682 775 try 683 776 { 684 Long .parseLong( input );685 return true;777 Long val = Long.parseLong( input ); 778 return (val > 0); 686 779 } 687 780 catch( Exception e) … … 702 795 703 796 797 private void InterpolateAlphaSection(int startNodeIndex, int endNodeIndex, String endValueString, 798 char startingChar, char endingChar) { 799 800 801 String baseAlpha = BaseAlpha(endValueString); 802 int nSegments =endNodeIndex - startNodeIndex; 803 804 double[] segmentLengths = new double[nSegments]; 805 // Total length of address interpolation way section 806 double totalLength= CalculateSegmentLengths(startNodeIndex, endNodeIndex, segmentLengths); 807 808 809 int nHouses = endingChar - startingChar-1; // # of house number nodes to create 810 if (nHouses > 0) { 811 812 double houseSpacing = totalLength / (nHouses+1); 813 814 Node lastHouseNode = addrInterpolationWay.getNode(startNodeIndex); 815 int currentSegment = 0; // Segment being used to place new house # node 816 char currentChar= startingChar; 817 while (nHouses > 0) { 818 double distanceNeeded = houseSpacing; 819 820 // Move along segments until we can place the new house number 821 while (distanceNeeded > segmentLengths[currentSegment]) { 822 distanceNeeded -= segmentLengths[currentSegment]; 823 currentSegment++; 824 lastHouseNode = addrInterpolationWay.getNode(startNodeIndex + currentSegment); 825 } 826 827 // House number is to be positioned in current segment. 828 double proportion = distanceNeeded / segmentLengths[currentSegment]; 829 Node toNode = addrInterpolationWay.getNode(startNodeIndex + 1 + currentSegment); 830 LatLon newHouseNumberPosition = lastHouseNode.getCoor().interpolate(toNode.getCoor(), proportion); 831 832 833 834 Node newHouseNumberNode = new Node(newHouseNumberPosition); 835 currentChar++; 836 if ( (currentChar >'Z') && (currentChar <'a')) { 837 // Wraparound past uppercase Z: go directly to lower case a 838 currentChar = 'a'; 839 840 } 841 String newHouseNumber = baseAlpha + currentChar; 842 newHouseNumberNode.put("addr:housenumber", newHouseNumber); 843 844 commandGroup.add(new AddCommand(newHouseNumberNode)); 845 houseNumberNodes.add(newHouseNumberNode); // Street, etc information to be added later 846 847 lastHouseNode = newHouseNumberNode; 848 849 850 segmentLengths[currentSegment] -= distanceNeeded; // Track amount used 851 nHouses -- ; 852 } 853 } 854 855 856 } 857 858 859 private void CreateAlphaInterpolation(String startValueString, String endValueString) { 860 char startingChar = LastChar(startValueString); 861 char endingChar = LastChar(endValueString); 862 863 if (isLong(startValueString)) { 864 // Special case of numeric first value, followed by 'A' 865 startingChar = 'A'-1; 866 } 867 868 // Search for possible anchors from the 2nd node to 2nd from last, interpolating between each anchor 869 int startIndex = 0; // Index into first interpolation zone of address interpolation way 870 for (int i=1; i<addrInterpolationWay.getNodesCount()-1; i++) { 871 Node testNode = addrInterpolationWay.getNode(i); 872 String endNodeNumber = testNode.get("addr:housenumber"); 873 if (endNodeNumber != null) { 874 // This is a potential anchor node 875 if (endNodeNumber != "") { 876 char anchorChar = LastChar(endNodeNumber); 877 if ( (anchorChar >startingChar) && (anchorChar < endingChar) ) { 878 // Lies within the expected range 879 InterpolateAlphaSection(startIndex, i, endNodeNumber, startingChar, anchorChar); 880 881 // For next interpolation section 882 startingChar = anchorChar; 883 startValueString = endNodeNumber; 884 startIndex = i; 885 } 886 } 887 888 } 889 } 890 891 // End nodes do not actually contain housenumber value yet (command has not executed), so use user-entered value 892 InterpolateAlphaSection(startIndex, addrInterpolationWay.getNodesCount()-1, endValueString, startingChar, endingChar); 893 894 } 895 896 897 private double CalculateSegmentLengths(int startNodeIndex, int endNodeIndex, double segmentLengths[]) { 898 Node fromNode = addrInterpolationWay.getNode(startNodeIndex); 899 double totalLength = 0.0; 900 int nSegments = segmentLengths.length; 901 for (int segment = 0; segment < nSegments; segment++) { 902 Node toNode = addrInterpolationWay.getNode(startNodeIndex + 1 + segment); 903 segmentLengths[segment]= fromNode.getCoor().greatCircleDistance(toNode.getCoor()); 904 totalLength += segmentLengths[segment]; 905 906 fromNode = toNode; 907 } 908 return totalLength; 909 910 } 911 912 913 private void InterpolateNumericSection(int startNodeIndex, int endNodeIndex, 914 long startingAddr, long endingAddr, 915 long increment) { 916 917 918 int nSegments =endNodeIndex - startNodeIndex; 919 920 double[] segmentLengths = new double[nSegments]; 921 922 // Total length of address interpolation way section 923 double totalLength= CalculateSegmentLengths(startNodeIndex, endNodeIndex, segmentLengths); 924 925 926 int nHouses = (int)((endingAddr - startingAddr) / increment) -1; 927 if (nHouses > 0) { 928 929 double houseSpacing = totalLength / (nHouses+1); 930 931 Node lastHouseNode = addrInterpolationWay.getNode(startNodeIndex); 932 int currentSegment = 0; // Segment being used to place new house # node 933 long currentHouseNumber = startingAddr; 934 while (nHouses > 0) { 935 double distanceNeeded = houseSpacing; 936 937 // Move along segments until we can place the new house number 938 while (distanceNeeded > segmentLengths[currentSegment]) { 939 distanceNeeded -= segmentLengths[currentSegment]; 940 currentSegment++; 941 lastHouseNode = addrInterpolationWay.getNode(startNodeIndex + currentSegment); 942 } 943 944 // House number is to be positioned in current segment. 945 double proportion = distanceNeeded / segmentLengths[currentSegment]; 946 Node toNode = addrInterpolationWay.getNode(startNodeIndex + 1 + currentSegment); 947 LatLon newHouseNumberPosition = lastHouseNode.getCoor().interpolate(toNode.getCoor(), proportion); 948 949 950 Node newHouseNumberNode = new Node(newHouseNumberPosition); 951 currentHouseNumber += increment; 952 String newHouseNumber = Long.toString(currentHouseNumber); 953 newHouseNumberNode.put("addr:housenumber", newHouseNumber); 954 955 commandGroup.add(new AddCommand(newHouseNumberNode)); 956 houseNumberNodes.add(newHouseNumberNode); // Street, etc information to be added later 957 958 lastHouseNode = newHouseNumberNode; 959 960 961 segmentLengths[currentSegment] -= distanceNeeded; // Track amount used 962 nHouses -- ; 963 } 964 } 965 966 967 } 968 969 970 private void CreateNumericInterpolation(String startValueString, String endValueString, long increment) { 971 972 long startingAddr = Long.parseLong( startValueString ); 973 long endingAddr = Long.parseLong( endValueString ); 974 975 976 // Search for possible anchors from the 2nd node to 2nd from last, interpolating between each anchor 977 int startIndex = 0; // Index into first interpolation zone of address interpolation way 978 for (int i=1; i<addrInterpolationWay.getNodesCount()-1; i++) { 979 Node testNode = addrInterpolationWay.getNode(i); 980 String strEndNodeNumber = testNode.get("addr:housenumber"); 981 if (strEndNodeNumber != null) { 982 // This is a potential anchor node 983 if (isLong(strEndNodeNumber)) { 984 985 long anchorAddrNumber = Long.parseLong( strEndNodeNumber ); 986 if ( (anchorAddrNumber >startingAddr) && (anchorAddrNumber < endingAddr) ) { 987 // Lies within the expected range 988 InterpolateNumericSection(startIndex, i, startingAddr, anchorAddrNumber, increment); 989 990 // For next interpolation section 991 startingAddr = anchorAddrNumber; 992 startValueString = strEndNodeNumber; 993 startIndex = i; 994 } 995 } 996 997 } 998 } 999 1000 // End nodes do not actually contain housenumber value yet (command has not executed), so use user-entered value 1001 InterpolateNumericSection(startIndex, addrInterpolationWay.getNodesCount()-1, startingAddr, endingAddr, increment); 1002 } 1003 1004 1005 // Called if user has checked "Convert to House Numbers" checkbox. 1006 private void ConvertWayToHousenumbers(String selectedMethod, String startValueString, String endValueString, 1007 String incrementString) { 1008 // - Use nodes labeled with 'same type' as interim anchors in the middle of the way to identify unequal spacing. 1009 // - Ignore nodes of different type; for example '25b' is ignored in sequence 5..15 1010 1011 // Calculate required number of house numbers to create 1012 if (selectedMethod.equals("alphabetic")) { 1013 1014 CreateAlphaInterpolation(startValueString, endValueString); 1015 1016 1017 } else { 1018 long increment = 1; 1019 if (selectedMethod.equals("odd") || selectedMethod.equals("even")) { 1020 increment = 2; 1021 } else if (selectedMethod.equals("Numeric")) { 1022 increment = Long.parseLong(incrementString); 1023 } 1024 CreateNumericInterpolation(startValueString, endValueString, increment); 1025 1026 } 1027 1028 1029 RemoveAddressInterpolationWay(); 1030 1031 } 1032 1033 1034 private void RemoveAddressInterpolationWay() { 1035 1036 // Remove untagged nodes 1037 for (int i=1; i<addrInterpolationWay.getNodesCount()-1; i++) { 1038 Node testNode = addrInterpolationWay.getNode(i); 1039 if (!testNode.hasKeys()) { 1040 commandGroup.add(new DeleteCommand(testNode)); 1041 } 1042 } 1043 1044 // Remove way 1045 commandGroup.add(new DeleteCommand(addrInterpolationWay)); 1046 addrInterpolationWay = null; 1047 1048 } 1049 1050 1051 704 1052 private boolean ValidateAndSave() { 705 1053 706 1054 String startValueString = ReadTextField(startTextField); 707 1055 String endValueString = ReadTextField(endTextField); 1056 String incrementString = ReadTextField(incrementTextField); 708 1057 String city = ReadTextField(cityTextField); 709 1058 String state = ReadTextField(stateTextField); … … 738 1087 }else if (selectedMethod.equals("alphabetic")) { 739 1088 errorMessage = ValidateAlphaAddress(startValueString, endValueString); 1089 1090 }else if (selectedMethod.equals("Numeric")) { 1091 1092 if (!ValidNumericIncrementString(incrementString, startAddr, endAddr)) { 1093 errorMessage = tr("Expected valid number for address increment"); 1094 } 1095 740 1096 } 741 1097 if (!errorMessage.equals("")) { … … 764 1120 Node lastNode = addrInterpolationWay.getNode(addrInterpolationWay.getNodesCount()-1); 765 1121 766 commandGroup.add(new ChangePropertyCommand(addrInterpolationWay, "addr:interpolation", selectedMethod));767 commandGroup.add(new ChangePropertyCommand(firstNode, "addr:housenumber", startValueString));768 commandGroup.add(new ChangePropertyCommand(lastNode, "addr:housenumber", endValueString));769 if (streetNameButton.isSelected()) {770 771 commandGroup.add(new ChangePropertyCommand(firstNode, "addr:street", streetName));772 commandGroup.add(new ChangePropertyCommand(lastNode, "addr:street", streetName));773 774 }775 // Add address interpolation house number nodes to main house number node list for common processing776 houseNumberNodes.add(firstNode);777 houseNumberNodes.add(lastNode);778 779 1122 // De-select address interpolation way; leave street selected 780 1123 DataSet currentDataSet = Main.main.getCurrentDataSet(); 781 1124 if (currentDataSet != null) { 782 1125 currentDataSet.clearSelection(addrInterpolationWay); 783 } 1126 currentDataSet.clearSelection(lastNode); // Workaround for JOSM Bug #3838 1127 } 1128 1129 1130 String interpolationTagValue = selectedMethod; 1131 if (selectedMethod.equals("Numeric")) { 1132 // The interpolation method is the number for 'Numeric' case 1133 interpolationTagValue = incrementString; 1134 } 1135 1136 if (cbConvertToHouseNumbers.getState()) { 1137 // Convert way to house numbers is checked. 1138 // Create individual nodes and delete interpolation way 1139 ConvertWayToHousenumbers(selectedMethod, startValueString, endValueString, incrementString); 1140 } else { 1141 // Address interpolation way will remain 1142 commandGroup.add(new ChangePropertyCommand(addrInterpolationWay, "addr:interpolation", interpolationTagValue)); 1143 commandGroup.add(new ChangePropertyCommand(addrInterpolationWay, "addr:inclusion", GetInclusionMethod())); 1144 } 1145 1146 commandGroup.add(new ChangePropertyCommand(firstNode, "addr:housenumber", startValueString)); 1147 commandGroup.add(new ChangePropertyCommand(lastNode, "addr:housenumber", endValueString)); 1148 // Add address interpolation house number nodes to main house number node list for common processing 1149 houseNumberNodes.add(firstNode); 1150 houseNumberNodes.add(lastNode); 1151 784 1152 } 785 1153 … … 831 1199 return true; 832 1200 } 1201 1202 1203 private boolean ValidNumericIncrementString(String incrementString, long startingAddr, long endingAddr) { 1204 1205 if (!isLong(incrementString)) { 1206 return false; 1207 } 1208 long testIncrement = Long.parseLong(incrementString); 1209 if ( (testIncrement <=0) || (testIncrement > endingAddr ) ) { 1210 return false; 1211 } 1212 1213 if ( ((endingAddr - startingAddr) % testIncrement) != 0) { 1214 return false; 1215 } 1216 return true; 1217 } 1218 1219 833 1220 834 1221 // Create Associated Street relation, add street, and add to list of commands to perform … … 891 1278 errorMessage = tr("Please enter valid number for starting and ending address"); 892 1279 } else { 893 char startingChar = startValueString.charAt(startValueString.length()-1);894 char endingChar = endValueString.charAt(endValueString.length()-1);1280 char startingChar = LastChar(startValueString); 1281 char endingChar = LastChar(endValueString); 895 1282 896 1283 … … 915 1302 916 1303 // Get number portion of first item: may or may not have letter suffix 917 String numStart = startValueString.substring(0, startValueString.length()-1);1304 String numStart = BaseAlpha(startValueString); 918 1305 if (IsNumeric(startValueString)) { 919 1306 numStart = startValueString; 920 1307 } 921 1308 922 String numEnd = endValueString.substring(0, endValueString.length()-1);1309 String numEnd = BaseAlpha(endValueString); 923 1310 if (!numStart.equals(numEnd)) { 924 1311 errorMessage = tr("Starting and ending numbers must be the same for alphabetic addresses"); … … 975 1362 976 1363 1364 private String GetInclusionMethod() { 1365 int selectedIndex = addrInclusionList.getSelectedIndex(); 1366 lastAccuracyIndex = selectedIndex; 1367 return addrInclusionTags[selectedIndex]; 1368 } 1369 1370 977 1371 978 1372
Note:
See TracChangeset
for help on using the changeset viewer.