Changeset 18415 in osm for applications/editors/josm
- Timestamp:
- 2009-11-02T08:53:38+01:00 (15 years ago)
- Location:
- applications/editors/josm/plugins
- Files:
-
- 6 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/graphview/build.xml
r17538 r18415 57 57 <attribute name="Plugin-Description" value="Visualizes routing information as a routing graph."/> 58 58 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/Graphview"/> 59 <attribute name="Plugin-Mainversion" value="2 082"/>59 <attribute name="Plugin-Mainversion" value="2381"/> 60 60 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 61 61 </manifest> -
applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/data/JOSMDataSource.java
r17538 r18415 50 50 51 51 public Iterable<Node> getNodes() { 52 return new FilteredOsmPrimitiveIterable<Node>(Main.main.getCurrentDataSet(). nodes);52 return new FilteredOsmPrimitiveIterable<Node>(Main.main.getCurrentDataSet().getNodes()); 53 53 } 54 54 55 55 public Iterable<Relation> getRelations() { 56 return new FilteredRelationIterable(Main.main.getCurrentDataSet(). relations);56 return new FilteredRelationIterable(Main.main.getCurrentDataSet().getRelations()); 57 57 } 58 58 59 59 public Iterable<Way> getWays() { 60 return new FilteredOsmPrimitiveIterable<Way>(Main.main.getCurrentDataSet(). ways);60 return new FilteredOsmPrimitiveIterable<Way>(Main.main.getCurrentDataSet().getWays()); 61 61 } 62 62 -
applications/editors/josm/plugins/multipoly/build.xml
r18142 r18415 47 47 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/> 48 48 <attribute name="Plugin-Link" value="http://svn.openstreetmap.org/applications/editors/josm/plugins/multipoly/"/> 49 <attribute name="Plugin-Mainversion" value="2 267"/>49 <attribute name="Plugin-Mainversion" value="2381"/> 50 50 </manifest> 51 51 </jar> -
applications/editors/josm/plugins/multipoly/src/multipoly/MultipolyAction.java
r18079 r18415 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.awt.event.*; 7 import java.util.*; 6 import java.awt.event.ActionEvent; 7 import java.awt.event.KeyEvent; 8 import java.util.ArrayList; 9 import java.util.Collection; 10 import java.util.HashSet; 11 import java.util.LinkedList; 12 import java.util.List; 8 13 9 14 import javax.swing.JOptionPane; 10 15 16 import org.openstreetmap.josm.Main; 11 17 import org.openstreetmap.josm.actions.JosmAction; 12 import org.openstreetmap.josm.Main; 13 import org.openstreetmap.josm.command.*; 18 import org.openstreetmap.josm.command.AddCommand; 19 import org.openstreetmap.josm.command.Command; 20 import org.openstreetmap.josm.command.SequenceCommand; 14 21 import org.openstreetmap.josm.data.coor.EastNorth; 15 import org.openstreetmap.josm.data.osm.*; 16 import org.openstreetmap.josm.tools.*; 22 import org.openstreetmap.josm.data.osm.Node; 23 import org.openstreetmap.josm.data.osm.OsmPrimitive; 24 import org.openstreetmap.josm.data.osm.Relation; 25 import org.openstreetmap.josm.data.osm.RelationMember; 26 import org.openstreetmap.josm.data.osm.Way; 27 import org.openstreetmap.josm.tools.Pair; 28 import org.openstreetmap.josm.tools.Shortcut; 17 29 18 30 /** 19 31 * Create multipolygon from selected ways automatically. 20 * 32 * 21 33 * New relation with type=multipolygon is created 22 * 34 * 23 35 * If one or more of ways is already in relation with type=multipolygon or the way os not closed, 24 36 * then error is reported and no relation is created 25 * 37 * 26 38 * The "inner" and "outer" roles are guessed automatically. 27 39 * First, bbox is calculated for each way. then the largest area is assumed to be outside … … 39 51 setEnabled(true); 40 52 } 41 53 42 54 /** 43 55 * The action button has been clicked … … 48 60 // Get all ways in some type=multipolygon relation 49 61 HashSet<OsmPrimitive> relationsInMulti = new HashSet<OsmPrimitive>(); 50 for (Relation r : Main.main.getCurrentDataSet(). relations) {62 for (Relation r : Main.main.getCurrentDataSet().getRelations()) { 51 63 if (!r.isUsable()) continue; 52 64 if (r.get("type")!="multipolygon") continue; … … 60 72 61 73 //List of selected ways 62 List<Way> selectedWays = new ArrayList<Way>(); ;74 List<Way> selectedWays = new ArrayList<Way>(); 63 75 //Area of largest way (in square degrees) 64 76 double maxarea=0; … … 118 130 rel.put("type","multipolygon"); 119 131 //Add ways to it 120 for (int i=0;i<selectedWays.size();i++) { 132 for (int i=0;i<selectedWays.size();i++) { 121 133 Way s=selectedWays.get(i); 122 134 String xrole="inner"; -
applications/editors/josm/plugins/routing/build.xml
r18404 r18415 44 44 <attribute name="Plugin-Description" value="Provides routing capabilities."/> 45 45 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/Routing"/> 46 <attribute name="Plugin-Mainversion" value="23 23"/>46 <attribute name="Plugin-Mainversion" value="2381"/> 47 47 <attribute name="Plugin-Stage" value="50"/> 48 48 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> -
applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/RoutingGraph.java
r17544 r18415 130 130 rgDelegator.setRouteType(this.routeType); 131 131 // iterate all ways and segments for all nodes: 132 for (Way way : data. ways) {132 for (Way way : data.getWays()) { 133 133 if (way != null && !way.isDeleted() && this.isvalidWay(way)) { 134 134 Node from = null; -
applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingLayer.java
r17544 r18415 133 133 Node nearest = null; 134 134 double minDist = 0; 135 for (Way w : dataLayer.data. ways) {135 for (Way w : dataLayer.data.getWays()) { 136 136 if (w.isDeleted() || w.incomplete || w.get("highway")==null) continue; 137 137 for (Node n : w.getNodes()) { -
applications/editors/josm/plugins/utilsplugin/build.xml
r18387 r18415 25 25 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/> 26 26 <attribute name="Plugin-Description" value="Several utilities that make your life easier: e.g. simplify way, join areas, jump to position."/> 27 <attribute name="Plugin-Mainversion" value="23 55"/>27 <attribute name="Plugin-Mainversion" value="2381"/> 28 28 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 29 29 </manifest> -
applications/editors/josm/plugins/utilsplugin/src/UtilsPlugin/JoinAreasAction.java
r18387 r18415 443 443 private ArrayList<RelationRole> removeFromRelations(OsmPrimitive osm) { 444 444 ArrayList<RelationRole> result = new ArrayList<RelationRole>(); 445 for (Relation r : Main.main.getCurrentDataSet(). relations) {445 for (Relation r : Main.main.getCurrentDataSet().getRelations()) { 446 446 if (r.isDeleted() || r.incomplete) continue; 447 447 for (RelationMember rm : r.getMembers()) {
Note:
See TracChangeset
for help on using the changeset viewer.