Changeset 35976 in osm for applications/editors/josm/plugins/Create_grid_of_ways/src
- Timestamp:
- 2022-06-14T20:11:21+02:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/Create_grid_of_ways/src/CreateGridOfWaysPlugin/CreateGridOfWaysAction.java
r35583 r35976 16 16 import org.openstreetmap.josm.command.SequenceCommand; 17 17 import org.openstreetmap.josm.data.UndoRedoHandler; 18 import org.openstreetmap.josm.data.coor.ILatLon; 18 19 import org.openstreetmap.josm.data.coor.LatLon; 19 20 import org.openstreetmap.josm.data.osm.DataSet; … … 85 86 int c1=0,c2; 86 87 double latDif,lonDif; 87 LatLon llc = nodeCommon.getCoor();88 ILatLon llc = nodeCommon; 88 89 for (Node n1 : nodesWay1) { 89 LatLon ll1 = n1.getCoor();90 if ( ll1 == null || llc == null) {90 ILatLon ll1 = n1; 91 if (!ll1.isLatLonKnown() || !llc.isLatLonKnown()) { 91 92 Logging.warn("Null coordinates: {0} / {1}", n1, nodeCommon); 92 93 continue; … … 106 107 continue; 107 108 } 108 LatLon ll2 = n2.getCoor();109 ILatLon ll2 = n2; 109 110 Node nodeOfGrid = new Node(new LatLon(ll2.lat()+latDif, ll2.lon()+lonDif)); 110 111 cmds.add(new AddCommand(ds, nodeOfGrid));
Note:
See TracChangeset
for help on using the changeset viewer.