Changeset 13784 in osm for applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadSVGTask.java
- Timestamp:
- 2009-02-18T23:31:32+01:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadSVGTask.java
r13611 r13784 18 18 import java.util.LinkedList; 19 19 import java.util.List; 20 21 import javax.swing.JOptionPane; 20 22 21 23 import org.openstreetmap.josm.Main; … … 94 96 */ 95 97 private void createWay(String svg) { 96 String[] SVGpaths = new SVGParser().getPaths(svg); 98 String[] SVGpaths = new SVGParser().getClosedPaths(svg); 97 99 ArrayList<Double> fitViewBox = new ArrayList<Double>(); 98 100 ArrayList<ArrayList<EastNorth>> eastNorths = new ArrayList<ArrayList<EastNorth>>(); … … 116 118 } 117 119 wayToAdd.nodes.add(wayToAdd.nodes.get(0)); // close the circle 118 new SimplifyWay().simplifyWay(wayToAdd); 120 121 // simplify the way 122 double threshold = Double.parseDouble(Main.pref.get("cadastrewms.simplify-way-boundary", "1.0")); 123 new SimplifyWay().simplifyWay(wayToAdd, Main.ds, threshold); 124 119 125 cmds.add(new AddCommand(wayToAdd)); 120 126 Main.main.undoRedo.add(new SequenceCommand(tr("Create boundary"), cmds)); … … 205 211 206 212 public static void download(WMSLayer wmsLayer) { 213 if (CadastrePlugin.autoSourcing == false) { 214 JOptionPane.showMessageDialog(Main.parent, 215 tr("Please, enable auto-sourcing and check cadastre millesime.")); 216 return; 217 } 207 218 Main.worker.execute(new DownloadSVGTask(wmsLayer)); 208 219 }
Note:
See TracChangeset
for help on using the changeset viewer.
