Changeset 31156 in osm for applications/editors/josm/plugins
- Timestamp:
- 2015-05-28T21:06:56+02:00 (10 years ago)
- Location:
- applications/editors/josm/plugins/seachartedit/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachartedit/src/panels/PanelS57.java
r31060 r31156 65 65 tin.close(); 66 66 } 67 map = new S57map( );67 map = new S57map(true); 68 68 MapBounds bounds = S57dec.decodeFile(in, map); 69 69 -
applications/editors/josm/plugins/seachartedit/src/panels/ShowFrame.java
r31060 r31156 41 41 id = osm.getUniqueId(); 42 42 feature = map.index.get(id); 43 showMap = new S57map( );43 showMap = new S57map(true); 44 44 showMap.nodes = map.nodes; 45 45 showMap.edges = map.edges; -
applications/editors/josm/plugins/seachartedit/src/scedit/SCeditAction.java
r31060 r31156 23 23 import org.openstreetmap.josm.gui.MapView.EditLayerChangeListener; 24 24 import org.openstreetmap.josm.gui.layer.*; 25 import org.openstreetmap.josm.data.Bounds; 25 26 import org.openstreetmap.josm.data.SelectionChangedListener; 27 import org.openstreetmap.josm.data.coor.LatLon; 26 28 import org.openstreetmap.josm.data.osm.*; 27 29 import org.openstreetmap.josm.data.osm.event.*; … … 198 200 199 201 void makeMap() { 200 map = new S57map( );202 map = new S57map(true); 201 203 if (data != null) { 204 double minlat = 90; 205 double maxlat = -90; 206 double minlon = 180; 207 double maxlon = -180; 208 for (Bounds bounds : data.getDataSourceBounds()) { 209 if (bounds.getMinLat() < minlat) { 210 minlat = bounds.getMinLat(); 211 } 212 if (bounds.getMaxLat() > maxlat) { 213 maxlat = bounds.getMaxLat(); 214 } 215 if (bounds.getMinLon() < minlon) { 216 minlon = bounds.getMinLon(); 217 } 218 if (bounds.getMaxLon() > maxlon) { 219 maxlon = bounds.getMaxLon(); 220 } 221 } 222 map.addNode(1, maxlat, minlon); 223 map.addNode(2, minlat, minlon); 224 map.addNode(3, minlat, maxlon); 225 map.addNode(4, maxlat, maxlon); 226 map.bounds.minlat = Math.toRadians(minlat); 227 map.bounds.maxlat = Math.toRadians(maxlat); 228 map.bounds.minlon = Math.toRadians(minlon); 229 map.bounds.maxlon = Math.toRadians(maxlon); 202 230 for (Node node : data.getNodes()) { 203 map.addNode(node.getUniqueId(), node.getCoor().lat(), node.getCoor().lon()); 204 for (Entry<String, String> entry : node.getKeys().entrySet()) { 205 map.addTag(entry.getKey(), entry.getValue()); 206 } 207 map.tagsDone(node.getUniqueId()); 231 LatLon coor = node.getCoor(); 232 if (coor != null) { 233 map.addNode(node.getUniqueId(), coor.lat(), coor.lon()); 234 for (Entry<String, String> entry : node.getKeys().entrySet()) { 235 map.addTag(entry.getKey(), entry.getValue()); 236 } 237 map.tagsDone(node.getUniqueId()); 238 } 208 239 } 209 240 for (Way way : data.getWays()) { … … 232 263 } 233 264 } 265 map.mapDone(); 234 266 } 235 267 }
Note:
See TracChangeset
for help on using the changeset viewer.