Changeset 27857 in osm for applications/editors/josm/plugins/simplifyarea/src
- Timestamp:
- 2012-02-18T15:10:01+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/simplifyarea/src/sk/zdila/josm/plugin/simplify/SimplifyAreaPreferenceSetting.java
r25883 r27857 9 9 10 10 import org.openstreetmap.josm.Main; 11 import org.openstreetmap.josm.gui.preferences.PreferenceSetting; 11 import org.openstreetmap.josm.gui.preferences.DefaultTabPreferenceSetting; 12 12 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane; 13 13 import org.openstreetmap.josm.tools.GBC; 14 14 15 public class SimplifyAreaPreferenceSetting implementsPreferenceSetting {15 public class SimplifyAreaPreferenceSetting extends DefaultTabPreferenceSetting { 16 16 17 17 static final String DIST_FACTOR = "simplify-area.dist.factor"; … … 31 31 private final JTextField distanceFactor = new JTextField(8); 32 32 33 public SimplifyAreaPreferenceSetting() { 34 super("simplifyArea", "Simplify Area", "Node of the way (area) is removed if all of <u>Angle Weight</u>, <u>Area Weight</u> and <u>Distance Weight</u> are greater than 1. " + 35 "<u>Weight</u> is computed as <u>Value</u> / <u>Threshold</u>, where <u>Value</u> is one of <u>Angle</u>, <u>Area</u> and <u>Distance</u> " + 36 "computed from every three adjanced points of the way." + 37 "<ul><li><u>Value</u> of <u>Angle</u> is angle in degrees on the second node</li>" + 38 "<li><u>Value</u> of <u>Area</u> is area formed by triangle</li>" + 39 "<li><u>Value</u> of the <u>Distance</u> is Cross Track Error Distance</li></ul>" + 40 "All three <u>Weight</u>s multiplied by its <u>Factor</u>s are summed and node of the lowest sum is removed first. " + 41 "Removal continues until there is no node to remove." + 42 "Merge Nearby Nodes is another step of the simplification that merges adjanced nodes that are closer than <u>Threshold</u> meters."); 43 } 33 44 34 45 @Override 35 46 public void addGui(final PreferenceTabbedPane gui) { 36 final JPanel tab = gui.createPreferenceTab("simplifyArea", "Simplify Area", "Node of the way (area) is removed if all of <u>Angle Weight</u>, <u>Area Weight</u> and <u>Distance Weight</u> are greater than 1. " + 37 "<u>Weight</u> is computed as <u>Value</u> / <u>Threshold</u>, where <u>Value</u> is one of <u>Angle</u>, <u>Area</u> and <u>Distance</u> " + 38 "computed from every three adjanced points of the way." + 39 "<ul><li><u>Value</u> of <u>Angle</u> is angle in degrees on the second node</li>" + 40 "<li><u>Value</u> of <u>Area</u> is area formed by triangle</li>" + 41 "<li><u>Value</u> of the <u>Distance</u> is Cross Track Error Distance</li></ul>" + 42 "All three <u>Weight</u>s multiplied by its <u>Factor</u>s are summed and node of the lowest sum is removed first. " + 43 "Removal continues until there is no node to remove." + 44 "Merge Nearby Nodes is another step of the simplification that merges adjanced nodes that are closer than <u>Threshold</u> meters."); 47 final JPanel tab = gui.createPreferenceTab(this); 45 48 46 49 angleThreshold.setText(Main.pref.get(ANGLE_THRESHOLD, "10"));
Note:
See TracChangeset
for help on using the changeset viewer.