Changeset 30587 in osm for applications/editors/josm
- Timestamp:
- 2014-08-15T18:02:25+02:00 (10 years ago)
- Location:
- applications/editors/josm/plugins/reltoolbox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/reltoolbox/build.xml
r30416 r30587 4 4 <property name="commit.message" value="RelToolbox: make natural sort for relation and find relation lists"/> 5 5 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 6 <property name="plugin.main.version" value="7 001"/>6 <property name="plugin.main.version" value="7392"/> 7 7 8 8 <property name="plugin.author" value="Ilya Zverev"/> -
applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/CreateMultipolygonAction.java
r30209 r30587 88 88 89 89 // for now, just copying standard action 90 Multipolygon Create mpc = new MultipolygonCreate();90 MultipolygonBuilder mpc = new MultipolygonBuilder(); 91 91 String error = mpc.makeFromWays(getCurrentDataSet().getSelectedWays()); 92 92 if( error != null ) { … … 100 100 } else 101 101 rel.put("type", "multipolygon"); 102 for( Multipolygon Create.JoinedPolygon poly : mpc.outerWays )102 for( MultipolygonBuilder.JoinedPolygon poly : mpc.outerWays ) 103 103 for( Way w : poly.ways ) 104 104 rel.addMember(new RelationMember("outer", w)); 105 for( Multipolygon Create.JoinedPolygon poly : mpc.innerWays )105 for( MultipolygonBuilder.JoinedPolygon poly : mpc.innerWays ) 106 106 for( Way w : poly.ways ) 107 107 rel.addMember(new RelationMember("inner", w)); -
applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/ReconstructPolygonAction.java
r29535 r30587 2 2 3 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 4 5 import java.awt.event.ActionEvent; 5 import java.util.*; 6 import java.util.ArrayList; 7 import java.util.Arrays; 8 import java.util.Collections; 9 import java.util.HashSet; 10 import java.util.Iterator; 11 import java.util.List; 12 import java.util.Map; 13 import java.util.Set; 14 6 15 import javax.swing.AbstractAction; 7 16 import javax.swing.JOptionPane; 17 8 18 import org.openstreetmap.josm.Main; 9 import org.openstreetmap.josm.command.*; 10 import org.openstreetmap.josm.data.osm.*; 11 import org.openstreetmap.josm.data.osm.MultipolygonCreate.JoinedPolygon; 19 import org.openstreetmap.josm.command.AddCommand; 20 import org.openstreetmap.josm.command.ChangeCommand; 21 import org.openstreetmap.josm.command.Command; 22 import org.openstreetmap.josm.command.DeleteCommand; 23 import org.openstreetmap.josm.command.SequenceCommand; 24 import org.openstreetmap.josm.data.osm.MultipolygonBuilder; 25 import org.openstreetmap.josm.data.osm.MultipolygonBuilder.JoinedPolygon; 26 import org.openstreetmap.josm.data.osm.OsmPrimitive; 27 import org.openstreetmap.josm.data.osm.Relation; 28 import org.openstreetmap.josm.data.osm.RelationMember; 29 import org.openstreetmap.josm.data.osm.Way; 12 30 import org.openstreetmap.josm.gui.DefaultNameFormatter; 13 31 import org.openstreetmap.josm.tools.ImageProvider; 32 14 33 import relcontext.ChosenRelation; 15 34 import relcontext.ChosenRelationListener; … … 49 68 } 50 69 51 Multipolygon Create mpc = new MultipolygonCreate();70 MultipolygonBuilder mpc = new MultipolygonBuilder(); 52 71 String error = mpc.makeFromWays(ways); 53 72 if( error != null ) { -
applications/editors/josm/plugins/reltoolbox/src/relcontext/relationfix/MultipolygonFixer.java
r28762 r30587 10 10 import org.openstreetmap.josm.command.ChangeCommand; 11 11 import org.openstreetmap.josm.command.Command; 12 import org.openstreetmap.josm.data.osm.Multipolygon Create;12 import org.openstreetmap.josm.data.osm.MultipolygonBuilder; 13 13 import org.openstreetmap.josm.data.osm.OsmPrimitive; 14 14 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; … … 56 56 if( p instanceof Way ) 57 57 ways.add((Way)p); 58 Multipolygon Create mpc = new MultipolygonCreate();58 MultipolygonBuilder mpc = new MultipolygonBuilder(); 59 59 String error = mpc.makeFromWays(ways); 60 60 if( error != null ) … … 64 64 boolean fixed = false; 65 65 Set<Way> outerWays = new HashSet<Way>(); 66 for( Multipolygon Create.JoinedPolygon poly : mpc.outerWays )66 for( MultipolygonBuilder.JoinedPolygon poly : mpc.outerWays ) 67 67 for( Way w : poly.ways ) 68 68 outerWays.add(w); 69 69 Set<Way> innerWays = new HashSet<Way>(); 70 for( Multipolygon Create.JoinedPolygon poly : mpc.innerWays )70 for( MultipolygonBuilder.JoinedPolygon poly : mpc.innerWays ) 71 71 for( Way w : poly.ways ) 72 72 innerWays.add(w);
Note:
See TracChangeset
for help on using the changeset viewer.