Changeset 31735 in osm for applications/editors/josm/plugins/seachart/src/s57/S57osm.java
- Timestamp:
- 2015-11-08T09:49:14+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/src/s57/S57osm.java
r31722 r31735 12 12 import java.io.BufferedReader; 13 13 import java.io.IOException; 14 import java.util.ArrayList; 15 import java.util.HashMap; 14 import java.util.*; 16 15 17 16 import s57.S57obj.*; … … 77 76 boolean inWay = false; 78 77 boolean inRel = false; 78 map.nodes.put(1l, map.new Snode()); 79 map.nodes.put(2l, map.new Snode()); 80 map.nodes.put(3l, map.new Snode()); 81 map.nodes.put(4l, map.new Snode()); 79 82 80 83 String ln; … … 85 88 if (token.matches("^minlat=.+")) { 86 89 map.bounds.minlat = Math.toRadians(Double.parseDouble(token.split("[\"\']")[1])); 90 map.nodes.get(2l).lat = map.bounds.minlat; 91 map.nodes.get(3l).lat = map.bounds.minlat; 87 92 } else if (token.matches("^minlon=.+")) { 88 93 map.bounds.minlon = Math.toRadians(Double.parseDouble(token.split("[\"\']")[1])); 94 map.nodes.get(1l).lon = map.bounds.minlon; 95 map.nodes.get(2l).lon = map.bounds.minlon; 89 96 } else if (token.matches("^maxlat=.+")) { 90 97 map.bounds.maxlat = Math.toRadians(Double.parseDouble(token.split("[\"\']")[1])); 98 map.nodes.get(1l).lat = map.bounds.maxlat; 99 map.nodes.get(4l).lat = map.bounds.maxlat; 91 100 } else if (token.matches("^maxlon=.+")) { 92 101 map.bounds.maxlon = Math.toRadians(Double.parseDouble(token.split("[\"\']")[1])); 102 map.nodes.get(3l).lon = map.bounds.maxlon; 103 map.nodes.get(4l).lon = map.bounds.maxlon; 93 104 } 94 105 } … … 199 210 return; 200 211 } 212 213 public static void OSMmeta(S57map map) { 214 map.addEdge(++map.xref); 215 for (long ref = 0; ref <= 4; ref++) { 216 map.addToEdge((ref == 0) ? 4 : ref); 217 } 218 map.addTag("seamark:type", "coverage"); 219 map.addTag("seamark:coverage:category", "coverage"); 220 map.tagsDone(map.xref); 221 } 201 222 202 223 }
Note:
See TracChangeset
for help on using the changeset viewer.